HomeTechnologyWindows 10How to export a registry key in Windows

How to export a registry key in Windows

- Advertisement -
- Advertisement -
- Advertisement -
- Advertisement -

The Windows Registry is a centralized, hierarchical database that is used by Windows to store system settings, hardware configurations, and user preferences. The Windows Registry can be explored using a program called Windows Registry Editor. Windows, but changing the wrong key could cause the computer to not boot properly, so it is advised to use it only when necessary.

More detailed information about the Windows Registry can be found in our article Demystifying the Windows Registry.

When making a change to the Registry, it is recommended that you first create an export of the entries to be modified. This allows you to save the information to a registry file, or to a .reg file, so that if a problem occurs you can import the original settings back into the registry.

Below you can see an example of a log file, where each setting is saved as text in the file.

Windows Registry File (.reg)

Windows registry file (.reg)

If you needed to import the data back into the Registry and overwrite any existing settings that apply to it, you would simply double-click the Registry file and allow the changes to be merged when prompted by Windows.

Below we have provided two methods that you can use to export Windows Registry data.

Method 1: Export a registry key using Windows Registry Editor

For most people, the easiest method of exporting a registry key is to use the Windows Registry Editor. Windows Registry Editor, also known as regedit.exe, is a graphical tool that allows you to modify the Windows Registry.

To open Registry Editor, type regedit in the Start Menu search field as shown below and then select Registry Editor.

Open the Registry Editor Open Registry Editor

When Registry Editor opens, navigate to the key you want to export. In our example, we are going to export the key HKEY_LOCAL_MACHINENSYSTEMN-CurrentControlSetN-ControlSessionManagerN-MemoryManagement .

The Windows Registry Editor Windows registry editor

When you are on the key you want to export, right-click the key name and select Export as it’s shown in the following.

Export key via Registry Editor Export key via registry editor

Windows will now prompt you for a location and file name where you want to save the registry information. Please select the location, enter a file name and press the button Save .

Save Registry File save log file

After saving the Registry file, you will see a file that ends with the extension .reg in the location where you saved it.

Registry File Icon

This file can be used in the future to restore the exported configuration if necessary.

Method 2: Export a registry key using the Reg command line command

Windows includes program reg.exe which can be used to manipulate the Windows Registry from the command line. In order to use this tool, you will need to open an elevated Command Prompt.

Once an elevated command prompt opens, you can use the reg.exe command to export a registry key using the following syntax:

reg exportar [clave] [nombre_de_fichero]

Por ejemplo, para exportar el "HKEY_LOCAL_MACHINENSYSTEMN-CurrentControlSetN-ControlNSession ManagerN-Memory Management" al archivo test.reg, se usaría el siguiente comando:

reg export "HKEY_LOCAL_MACHINENSYSTEMN-Control Actual de la Gestión de la Memoria" test.reg

Tenga en cuenta que al introducir la clave del Registro para exportar, la pusimos entre comillas porque había un espacio en el nombre de la clave.

Puede ver un ejemplo de este comando que se utiliza en la imagen de abajo.

Using the Reg.exe command from an Elevated Command Prompt Usando el comando Reg.exe de un Indicador de Comando Elevado

Una vez ejecutado el comando, se creará un archivo, que en nuestro caso es test.reg, que contiene la clave de registro exportada.

- Advertisement -
- Advertisement -
Stay Connected
Must Read
- Advertisement -
Related News
- Advertisement -
%d bloggers like this: