This tutorial will show you how to export and import registry keys in Registry Editor using a REG file in Windows 10 and Windows 11.
System configuration information is stored centrally in a hierarchical database called the registry. You can use Registry Editor to add and edit registry keys and values, restore the registry from a backup or to default values, and to import or export keys for reference or backup.
You can export registry keys from Registry Editor to back up the selected key and its subkeys values and data to a REG file.
You can import a REG file to restore its keys, values, and data settings back to Registry Editor.
The HKEY_CURRENT_USER (HKCU) branch only affects the current user, and does not require being an administrator to export or import keys under it.
You must be signed in as an administrator to import keys from the following registry branches since they affect all users. You do not need to be an administrator to export keys under these branches.
- HKEY_CLASSES_ROOT (HKCR)
- HKEY_LOCAL_MACHINE (HKLM)
- HKEY_USERS (HKU)
- HKEY_CURRENT_CONFIG
How to back up and restore the registry in Windows - Microsoft Support
Explains how to back up the registry for restoration in case it gets corrupted in Windows 10, Windows 8.1, Windows 8, or Windows 7.
support.microsoft.com
About the Registry - Win32 apps
The following topics describe the registry and the functions you can call to retrieve and modify the data stored there.
learn.microsoft.com
Windows registry for advanced users - Windows Server
Describes the Windows registry and provides information about how to edit it.
learn.microsoft.com
Contents
- Option One: Export Registry Key in Registry Editor
- Option Two: Export Registry Key using Command
- Option Three: Import Registry Key using REG file
- Option Four: Import Registry Key in Registry Editor
- Option Five: Import Registry Key using Command
1 Open Registry Editor (regedit.exe)
2 In the left pane of Registry Editor, select the registry key or subkey you want to back up. (see screenshot below)
3 Perform an action below to export the selected key or subkey. (see screenshots below)
- Click/tap on File on the menu bar, and click/tap on Export.
- Right click on the selected key or subkey, and click/tap on Export.
- Press the Alt + F keys, and press the E key.
4 Perform the steps below to export the key or subkey to a REG file: (see screenshot below)
- Navigate to and select the location (ex: Desktop) you want to save the REG file to.
- Type a File name you want for the REG file.
- Click/tap on Save.
5 When finished, you can close Registry Editor if you like.
1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.
2 Type the command below into Windows Terminal, and press Enter. (see screenshot below)
reg export "full path of key" "full path to save .reg file"
All subkeys of this key will also be included in the export.
Substitute full path of key in the command above with the actual full path of the key or subkey you want to export from Registry Editor.
Substitute full path to save .reg file in the command above with the actual full path of the location you want to save the .reg file including its file name and .reg extension.
For example: reg export "HKEY_CURRENT_USER\Control Panel\Cursors" "C:\Users\Brink\Desktop\My_Cursors_settings.reg"
3 You can now close Windows Terminal if you like.
1 Perform an action below to import a REG file:
- Double click/tap on the REG file.
- Right click on the REG file, and click/tap on Merge.
3 Click/tap on Yes to confirm. (see screenshot below)
4 Click/tap on OK. (see screenshot below)
1 Open Registry Editor (regedit.exe)
2 Perform an action below to import a REG file: (see screenshot below)
- Click/tap on File on the menu bar, and click/tap on Import.
- Press the Alt + F keys, and press the I key.
3 Navigate to and select the .reg file you want to import, and click/tap on Open. (see screenshot below)
4 Click/tap on OK. (see screenshot below)
5 When finished, you can close Registry Editor if you like.
1 Open Windows Terminal or Windows Terminal (Admin) depending on REG access rights, and select either Windows PowerShell or Command Prompt.
2 Type the command below into Windows Terminal, and press Enter. (see screenshot below)
reg import "full path of .reg file"
Substitute full path of .reg file in the command above with the actual full path of the .reg file including its name and extension you want to import (merge) into Registry Editor.
For example: reg import "C:\Users\Brink\Desktop\My_Cursors_settings.reg"
3 You can now close the command prompt if you like.
That's it,
Shawn Brink
Last edited: