I was having issues with my computer (Windows 7 Pro 64 bit) and our support guys said it was related to my login going to a temporary profile. So, he created me a new profile. However, now I've lost my PuTTY and WinSCP configurations because they are stored in the registry. I figured out how to load a hive from my old profile and exported the WinSCP and PuTTY branches. However, I can't merge them to the registry; I get an "Error accessing the registry" message. I have administrator privileges and can access the registry via regedit. Why can't I merge the exports that came from the same machine?



Here's a snippet of the putty.reg file that I exported from the registry after converting it to ASCII:

Windows Registry Editor Version 5.00



"Recent sessions"=hex(7):63,00,73,00,70,00,32,00,74,00,68,00,31,00,6e,00,6f,00,\

Since the file is over 3000 lines long, I'm not posting all of it. The unicode version of the file (before conversion) began with ÿþ and had a space between each character and each new line had an empty line between. For example:

ÿþW i n d o w s   R e g i s t r y   E d i t o r   V e r s i o n   5 . 0 0 

[ H K E Y _ U S E R S \ S i m o n T a t h a m \ S o f t w a r e \ S i m o n T a t h a m ]

[ H K E Y _ U S E R S \ S i m o n T a t h a m \ S o f t w a r e \ S i m o n   T a t h a m \ P u T T Y ]
  • Sounds like it is a permissions issue with the key you are trying to merge into. Registry keys have permissions just like folders in windows explorer.
    – Moab
    Apr 28, 2012 at 3:30

11 Answers 11


The issue is different HKEY_USERS id's in your Windows installation and your registry file you wish to merge.

I had the exact same issue exporting my putty config to a new Windows 7 environment. Here's how I solved it:

  • Right click putty.reg file and chose the 'edit' option
  • Open regedit on the machine to merge putty config with
  • Copy the user ID# from the new machine under HKEY_USERS\\*your user ID# is here*
  • Replace the old ID# with the new ID# in the edit window for putty.reg
  • You should be able to merge the registry file without any issues.
  • 3
    Actually, you don't have to bother with the new ID#. All you need to do is use HKEY_CURRENT_USER\blahblah instead of HKEY_USERS\old-id\blahblah.
    – Mike Nakis
    Apr 30, 2013 at 21:49

If you are trying to do this from a cmd prompt, then you must right click on the cmd icon in the start menu and choose "Run as administrator". You have to do this even if you are already an Administrator on the system.

Then you should be able to merge the registry entries.

  • I tried by right clicking the .reg files (located on my Desktop) and choosing the "Merge" option, got the warning about making changes to the registry and when it tries to merge, get the error message. There's no option to run as administrator from the right-click menu.
    – sdoca
    Apr 27, 2012 at 19:49
  • 1
    Don't do that. Do what he said and open a command prompt 'as administrator' and then merge your .reg files from there opening them. (I'm assuming opening and merging are the same.) OR, open a command prompt 'as administrator, then run regedit.exe, then open and merge your .reg files from that. Starting with Vista and continuing in Windows 7, having admin rights doesn't mean you're always running as administrator.
    – Mark Allen
    Apr 27, 2012 at 20:14
  • 2
    Ok, I tried merging via the command line (as administrator) and got the same error still. I also tried importing into regedit which I opened from the administrator command line and got the same error. :(
    – sdoca
    Apr 27, 2012 at 21:41

I got this error when moving to Windows 10.

I did a combination of the above to fix mine.
When I exported it was keys from HKEY_Users\myname\Software... and it was in Unicode.

I did a global replace on the file, replacing HKEY_Users\myname with HKEY_CURRENT_USER\ That made the lines in the file look like this: [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions]

I then had to save it as ANSI. I ran Regedit 'as administrator' and imported from the file/import menu.

Hope this helps someone.


The file has to be saved as ASCII. For some reason, the file was saved as Unicode, and needs to be converted back.

And of course, like jftuga said, you need to merge as Administrator.

  • I converted the file from unicode to ascii, and still no go.
    – sdoca
    Apr 27, 2012 at 21:42
  • What do the contents of the file look like? Perhaps it is corrupt in some way.
    – user3463
    Apr 27, 2012 at 21:44
  • I've updated my question with a snippet from the file.
    – sdoca
    Apr 27, 2012 at 21:52
  • Is the User folder in the registry named the same way? Go into HKEY_USERS and have a look. If so, then I'm at a loss. Perhaps you need to log in as the Administrator and then merge the file.
    – user3463
    Apr 27, 2012 at 22:34
  • If my profile name is "user", my old profile (at least the Users directory) was renamed "userbak". Should the exported hive/registry settings be "user" or "userbak" for them to be able to be imported?
    – sdoca
    Apr 30, 2012 at 16:34

Try Emergency Boot CD ( http://www.prime-expert.com/ebcd/ ). It contains offline registry editor, so you can export registry key from the old accout (HKEY_USERS\OldUsername) and import into the new account (HKEY_USERS\NewUsername).

EBCD is a shareware for $25. Export and import can be done in text (.REG) or binary format. Binary format is the same as native NT hive, so it preserves all metadata and permissions for the keys.


I believe the exported data in the .reg files contains the Windows user ID # as part of the path of the reg key (like HKEY_USERS\S-1-5-21-602162358-1564985344-839422125-2292\etc).

I think the new profile you have has a different user ID # and therefore the exported path is invalid. You could 'find & replace' in the .reg export file which might work, but that may also trickle down other problems.


You can do it running the command prompt as administrator and then executing the export command as explained here:

regedit /e "%userprofile%\desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

Source: https://stackoverflow.com/questions/13023920/how-to-export-putty-sessions-list


Just this week, on Windows 10 x64, I couldn't merge a ".reg" file into the registry simply because it was located on a network drive (ie: N:\ was pointing at \\localserver\someshare\, and reg file path was n:\whatever.reg). Moving the .reg file to a local hard drive fixed the issue for me. Your problem might be related.

  • Your problem is not related.
    – DavidPostill
    Feb 3, 2016 at 14:02
  • 2
    Well, OP didn't specify WHERE he saved his ".reg" exports, so there's no proof that it's not related. Also, OP didn't come back and choose an answer either, so options are still open as to what the problem actually was. Also, anyone searching the net for this problem would hit this page, and my answer might apply to any passing visitor. So my answer is still a "possible answer". Feb 3, 2016 at 15:06

1.Open CMD(Prompt MS-DOS) Run as Administrator, Paste, and Run(press ENTER):

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /t Reg_dword /v DisableRegistryTools /f /d 0


I know this is old but for Putty specifically:

I followed the steps suggested by KronoS as the User ID was different in the exported reg key to that in my current registry.

However, still got the same error.

Noticed that there were a number of SSH keys listed at the bottom of the exported reg key under the SshHostKeys section. Removed these completely so it was just importing the sessions and I was able to successfully restore what I needed.

Hopefully this will prove helpful to others.

  1. Go to run -- regedit .
  2. In regedit go to --HKEy_CURRENTUSER >Software>SimonTATHAM. Right click to SIMONTATHAM, and select copy key name.

  3. Open reg file in word. On that file you will see [HKEY xxx/xxx/xxxx/xxxxxx ]. Replace everything in the close bracket with the key name you have copied in previous step. Do ctrl-H, fill in the items and replace all.

  4. Finally save it as .reg file and import it. Enjoy!!!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .