The first thing I thought, when I saw your question was...are you sure you need to do this?
Just in case you are unaware , the key
HKCU is loaded from the relevant
HKU\SID key at login time. It is very likely, unless you've just been messing around with your registry, that your own SID is S-1-5-21-3797103458-798797042-3558267449-1001. If that is the case you are simply trying to save two matching registry entries to the same file, which is pointless, as the unloading of
HKCU upon logoff will save those entries back to the
HKU\SID key. As soon as you log back on, those entries will match each other again.
There is a quick way for you to determine if there are any differences in the two locations, and that is by using the exact same utility you have used yourself,
reg.exe:
Code: Select all
SystemRoot%\System32\reg.exe Compare "HKCU\Console" "HKU\S-1-5-21-4151016604-2149655897-3626235661-1001\Console" /S /OD
If you see something like this:
…then clearly there is no need whatsover to copy both to the one location, and you would only need to export
HKCU\Console, or
HKU\S-1-5-21-4151016604-2149655897-3626235661-1001\Console, depending upon the reason for your task in the first place.
There is also an added benefit to doing this first, you could change the
/OD option to
/ON, which would not output any differences message, and allow you to use the error codes:
- 0 - Successful, the result compared is identical
- 1- Failed
- 2 - Successful, the result compared is different
…to determine whether you should copy both, copy just one, or something else.