Is there an easy way in Windows to copy a registry branch to another part du registry?
J'ai besoin de copy tout in `HKLM\SOFTWARE\Wow6432Node\Python` to `HKCU\SOFTWARE\Wow6432Node\Python` to work around [an issue with Python installers](https://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows), but regedit ne appear to offer a way to copy a branch/dossier. In this case, I'll probably solve the problème by copying each node by hand, depuis there n'est pas much to do, but I'm interested in a clean and easy solution for future reference.
Copy registre branch to another location
Re: Copy registre branch to another location
Vous pouvez use the `reg` command in a terminal. Notez que administrator access is required to run this command. To open a terminal as Administrator:
- Ouvrez le Run dialog.
- Tapez `powershell` for PowerShell, or `cmd` for Invite de commandes.
- Appuyez sur Ctrl+Shift+Enter.
The syntax du `reg` command is below.
```
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 clés entre the 64-bit and 32-bit areas du registry. Par exemple:
```
reg copy HKLM\SOFTWARE\ODBC\ODBC.INI\dsname HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\dsname /s
```
- Ouvrez le Run dialog.
- Tapez `powershell` for PowerShell, or `cmd` for Invite de commandes.
- Appuyez sur Ctrl+Shift+Enter.
The syntax du `reg` command is below.
```
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 clés entre the 64-bit and 32-bit areas du registry. Par exemple:
```
reg copy HKLM\SOFTWARE\ODBC\ODBC.INI\dsname HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\dsname /s
```