Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Thanks!

EDIT

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

[HKEY_USERS\SimonTatham\Software\SimonTatham]

[HKEY_USERS\SimonTatham\Software\SimonTatham\PuTTY]

[HKEY_USERS\SimonTatham\Software\SimonTatham\PuTTY\Jumplist]
"Recent sessions"=hex(7):63,00,73,00,70,00,32,00,74,00,68,00,31,00,6e,00,6f,00,\
  20,00,28,00,70,00,72,00,6f,00,64,00,29,00,00,00,74,00,68,00,32,00,2e,00,6e,\
  00,6f,00,2e,00,63,00,67,00,2e,00,6e,00,6d,00,73,00,2e,00,6d,00,6c,00,62,00,\
  2e,00,69,00,6e,00,65,00,74,00,20,00,28,00,70,00,72,00,6f,00,64,00,29,00,00,\
  00,74,00,68,00,32,00,2e,00,6e,00,6f,00,2e,00,63,00,67,00,2e,00,6c,00,61,00,\
  62,00,2e,00,6e,00,6d,00,73,00,2e,00,6d,00,6c,00,62,00,2e,00,69,00,6e,00,65,\
  00,74,00,20,00,28,00,6c,00,61,00,62,00,29,00,00,00,73,00,63,00,6d,00,32,00,\
  2e,00,6e,00,6f,00,2e,00,63,00,67,00,2e,00,6e,00,6d,00,73,00,2e,00,6d,00,6c,\
  00,62,00,2e,00,69,00,6e,00,65,00,74,00,00,00,63,00,73,00,70,00,31,00,74,00,\
  68,00,31,00,7a,00,7a,00,20,00,28,00,6c,00,61,00,62,00,29,00,00,00,63,00,73,\
  00,70,00,32,00,74,00,68,00,31,00,73,00,6f,00,20,00,28,00,70,00,72,00,6f,00,\
  64,00,29,00,00,00,74,00,68,00,31,00,2e,00,6e,00,6f,00,2e,00,63,00,67,00,2e,\
  00,6e,00,6d,00,73,00,2e,00,6d,00,6c,00,62,00,2e,00,69,00,6e,00,65,00,74,00,\
  20,00,28,00,70,00,72,00,6f,00,64,00,29,00,00,00,74,00,68,00,31,00,2e,00,6e,\
  00,6f,00,2e,00,63,00,67,00,2e,00,6c,00,61,00,62,00,2e,00,6e,00,6d,00,73,00,\
  2e,00,6d,00,6c,00,62,00,2e,00,69,00,6e,00,65,00,74,00,00,00,77,00,62,00,33,\
  00,63,00,6f,00,2e,00,73,00,6f,00,63,00,2e,00,73,00,68,00,61,00,77,00,2e,00,\
  63,00,61,00,00,00,73,00,72,00,31,00,2e,00,6e,00,6f,00,2e,00,63,00,67,00,2e,\
  00,6f,00,73,00,73,00,2e,00,6d,00,6c,00,62,00,2e,00,69,00,6e,00,65,00,74,00,\
  00,00,74,00,68,00,31,00,30,00,2d,00,70,00,72,00,6f,00,64,00,00,00,61,00,70,\
  00,70,00,36,00,73,00,6f,00,63,00,6c,00,61,00,62,00,00,00,00,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 ]
share|improve this question
    
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 '12 at 3:30

7 Answers 7

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.

share|improve this answer
    
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 '12 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 '12 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 '12 at 21:41

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.
share|improve this answer
1  
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 '13 at 21:49

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.

share|improve this answer
    
I converted the file from unicode to ascii, and still no go. –  sdoca Apr 27 '12 at 21:42
    
What do the contents of the file look like? Perhaps it is corrupt in some way. –  user3463 Apr 27 '12 at 21:44
    
I've updated my question with a snippet from the file. –  sdoca Apr 27 '12 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 '12 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 '12 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.

share|improve this answer

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.

share|improve this answer

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: http://stackoverflow.com/questions/13023920/how-to-export-putty-sessions-list

share|improve this answer
  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!!!!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.