How to export the Registry key in Windows
The Windows Registry can be discovered using a program called Windows Registry Editor, but modifying the wrong key can prevent the computer from booting properly, so use it only when necessary.
When making changes to the Registry, you should first create a export of the items you are about to modify. This allows you to save information to the Registry file or the .reg file so that if something goes wrong, you can reinstall the original settings into the Registry.
You can see an example of the Registry file below, in which each setting is saved as text in the file.

If you need to import data back into the Registry and overwrite any existing settings, simply double-click the Registry file and allow the changes to be merged when Windows prompts you.
Below, TipsMake.com provides two methods that you can use to export data from the Windows Registry.
Method 1: Export the Registry key with Windows Registry Editor
For most people, the easiest method to export the 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, enter regedit in the Start menu search field as shown below and then select Registry Editor.
When Registry Editor opens, navigate to the key you want to export. In this example, the article will export the key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMoryory Management .

Once at the key you want to export, right-click on the key name and select Export as shown below.

Now, Windows will prompt you for the location and file name where you want to save the Registry information. Please select a location, enter a file name and click the Save button .

After saving the Registry file, you will see a file ending with the .reg extension at the location where you saved it.
This file can be used in the future to restore the exported settings if needed.
Method 2: Export the Registry key with the Reg command
Windows includes the reg.exe program that can be used to manipulate the Windows Registry from the command line. To use this tool, you will need to open the Command Prompt with admin rights.
Once the Command Prompt with admin rights is open, you can use the command reg.exe to export the Registry key with the following syntax:
reg export [key] [file_name]
For example, to export "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory Management" as a test.reg file, you would use the following command:
reg export "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory Management" test.reg
Please note, when entering the registry key to export, for example put it in quotation marks because there is a space in the key name.
You can see an example of this command being used in the image below.

When the command is executed, a file will be created, in our case test.reg, containing the exported Registry key.