1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

REGCOPYKEY error

Discussion in 'Support' started by myarmor, Apr 18, 2010.

  1. myarmor

    Joined:
    May 30, 2008
    Messages:
    65
    Likes Received:
    1
    I'm trying to use this to backup some old keys before installing an application (it is one of those which steals extensions).
    I use Windows 7 x64 Pro, TCC with "Run as Administrator".
    However, for some reason the command:

    %@REGCOPYKEY[HKCR\.mp4,\oldkeys]

    returns 0 (not copied).
    All variations (quotes,not quoted, etc) of the parameters seem to do the same.
    .mp4 and oldkeys are existing keys (the latter is empty).

    However, if I use
    %@REGCOPYKEY[HKCR\.mp4,HKCR\oldkeys]
    it performs the copy, with one issue. They end up in HKEY_CLASSES_ROOT\HKCR\oldkeys

    The question is, is this a bug? i.e requiring HKCR,HKCU etc to be specified in the second argument for the copy to succeed, but failing to remove it from the keyname (the docs says source and target must be in the same root)?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    Remove the leading '\' from the target:

    %@REGCOPYKEY[HKCR\.mp4,oldkeys]

    The target will automatically be put in the same root as the source, and
    Windows doesn't like the leading \.

    Rex Conn
    JP Software
     
  3. myarmor

    Joined:
    May 30, 2008
    Messages:
    65
    Likes Received:
    1
    I see.. Maybe the documentation should be changed accordingly?
    Currently it shows the second argument starting with backslash..

    Btw, the usage section shows @regdelkey as the command (but with proper params), not @regcopykey.

    Another way would be to strip rootkey\ from the second argument if encountered.
     

Share This Page