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.

Is there an easy way in Windows to copy a registry branch to another part of the registry?

I need to copy everything in HKLM\SOFTWARE\Wow6432Node\Python to HKCU\SOFTWARE\Wow6432Node\Python to work around an issue with Python installers, but regedit doesn't appear to offer a way to copy a branch/folder. In this case, I'll probably solve the problem by copying each node by hand, since there isn't much to do, but I'm interested in a clean and easy solution for future reference.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can use the reg command.

REG COPY KeyName1 KeyName2 [/s] [/f]

  KeyName    [\\Machine\]FullKey
    Machine  Name of remote machine - omitting defaults to the current machine.
             Only HKLM and HKU are available on remote machines.
    FullKey  ROOTKEY\SubKey
    ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
    SubKey   The full name of a registry key under the selected ROOTKEY.

  /s         Copies all subkeys and values.

  /f         Forces the copy without prompt.

I've used this to copy keys between the 64-bit and 32-bit areas of the registry. For example:

reg copy HKLM\SOFTWARE\ODBC\ODBC.INI\dsname HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\dsname /s
share|improve this answer
  1. Use a better third party registry editor that allows cut/copy and paste of entire keys/branches.

  2. Export the HKLM\SOFTWARE\Wow6432Node\Python branch to a .REG file, use a text editor to replace all instances of HKLM with HKCU, save and import.

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.