REGCOPYKEY error

May 30, 2008
65
1
#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)?
 

rconn

Administrator
Staff member
May 14, 2008
10,532
94
#2
> I'm trying to use this to backup the old keys before installing an
> application. 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.
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
 
May 30, 2008
65
1
#3
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
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.