Windows 11 Import & Export Registry Keys from Command Line

Written By Farhan Max

Registry editor contains the entire configuration data within its keys. You can easily modify those information keys with the help of registry import & export.

Also, you can move a registry key from one device to another if you know how to export and import them. This workaround will increase your work experience and save time. Because manually copying all the registry files can take an eternity.

windows-11-import-and-export-registry-keys-from-command-line

During the first quarantine, I started home office and needed to configure my PC according to my office laptop. At that crisis moment, this export-import knowledge helped me to set up my computer.

Don’t skip any part as I am sharing my practical experience in this article to import and export reg keys easily.

Let’s start!

How to Backup & Restore Registry on Windows 11/10

Before jumping into registry editor modification, you should back up the registry files. In case an error occurs when you change the registry editor.

Here are the steps to backup your registry files on Windows 11:

  • Press the Win+R keys to open the Run program.
  • Type regedit and hit the OK button.
  • Select the File section.
  • Click on the Export option.registry-editor-file-import
  • Choose the folder in which you want to export the registry backup.
  • Name the File and Save it.export-registry-file

Your registry file is now backed up, and if you want to restore the backup on your registry editor, you need to follow the instructions.

Also read, Schedule Windows 11 to Wake from Sleep Automatically.

Here are the steps to restore the registry on Windows 11/10:

  • Open the Registry Editor program.
  • Select the File section.
  • Choose the import option.windows-registry-import
  • Select the backup file and hit the Open box.export-registry-file

I believe the Registry is restored perfectly.

Check out our separate post: Disable File Compression on Windows 11/10.

How to Export & Import Registry Keys from the Command Line on Windows 11/10

Registry files are mainly a database containing entire configuration data. Every app and program on the Windows system needs optimization options to perform its task. All these settings are stored in the registry editor as keys.

Here are the steps to Export and import registry keys from the command line:

1. Export Registry Keys From The Command Line On Windows 11

You can easily export the registry keys and store them for further use. These backup keys will be handy if a problem appears in the registry system.

Here are the steps to export the registry keys from the command line: 

  • Move to the Search bar and type cmd.
  • Select the Run as administrator option.cmd-run-as-administrator
  • Write the following command reg export “FilePath” FileName.reg
  • Example:

reg export “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3\Setup” 10scope.reg

reg-export-command

  • Press the Enter key.

Now, if you move to the saved location, you can see a registry file. This process is identical for the Windows PowerShell option.

You may also like Windows 11: Disable You’re About to be Signed Out.

2. Import Registry Keys from the Command Line on Windows 11/10

Suppose you want to import the registry keys from the exported folder. You just need to reverse the previous process and write import in the place of export.

Here are the steps to import registry keys with the command line:

  • Go to the Search bar and write cmd.
  • Choose the Run as administrator option.
  • Type the following command reg import “NewFilePath\FileName.reg”

Example: reg import “C:\Windows\system32\10scope.reg” reg-import-command

  • Hit the Enter key.

Your registry key is now successfully imported onto your registry editor with the help of the Windows command line.

Related content you should read: Remove Bloatware From Windows 11/10.

How to Import & Export Registry Keys with Registry Editor on Windows 11/10

The easy way to import and export a registry key is to use the registry editor’s own option. This option is simple and effective.

Here are the steps to import and export registry keys with the registry editor:

1. Export a Registry Key with Registry Editor on Windows 11/10

To export a file or folder from the registry editor, you need to open the registry and select the file also choose the export option.

Here are the steps to export a registry key from the registry editor:

  • Press the Win+R keys to open the Run command.
  • Type regedit and hit the Enter button.
  • Select the folder or subkey you want to export.
  • Right-click on that subkey and choose the Export option.registry-editor-file-import
  • Choose the folder in which you want to export the key.
  • Name the file and save it.export-registry-file

The key is now exported and saved in your selected folder.

2. Import a Registry Key from the Registry Editor on Windows 11

Importing an exported registry key is very easy. You just need to move the exported folder and double-click on the key.

Here are the steps to import a registry key from the registry editor:

  • Open the Exported folder.
  • Double-click on the key.registry-editor-file-import
  • Click on the Yes option when the Registry editor window pops up.
  • Hit the OK button.

Your registry key is back in the folder where it belongs. But you can track down the mentioned process if you want another way to import the key.

Here are alternative steps to import the registry keys:

  • Open the Registry Editor program.
  • Click on the File section.
  • Select the Import option.windows-registry-import
  • Choose the file you want to import and Name it.
  • Click on the Open button.

The selected key is imported into the registry editor.

When you want to modify the registry editor but don’t know the command lines, the following subsection can help you. Because I collected and displayed some accessible registry modification commands.

Command Line for Editing the Registry Editor on Windows 11/10

The Registry Editor stores program data, But sometimes you can feel the need to modify or edit the registry configuration. For your aid, I am giving some command line instructions, and with the help of these commands, you can easily modify your registry.

Here is the list of Windows commands for registry Editor on Windows 11/10:

Windows Command Parameter
Details
reg exportThis command is used to export a subkey.
reg importImport can help you to include a file into the registry.
reg addYou can enter a new registry with the help of this command.
reg copyThis command allows you to copy a key from the registry editor.
reg deleteTo delete a key or subkey, you can use this command.
reg compareThis command can compare data between two or more keys.
reg loadYou can load different subkeys into a single key with the help of this command.
reg queryData can be recovered with the help of this command.
reg saveThis command saves a subkey or key.
reg unloadYou can expand the subkeys data with the help of this command.
reg restoreConfiguration data can restore with this command.

FAQs

Can I Copy The Registry From One Computer To Another? 

Yes, you can copy the registry from one computer to another. Export the registry file and move the exported file to another PC, then import the file, and your work is done.

Where are the Windows registry files?

For Windows 11/10/7, the registry files are stored in the C:\Windows\System32\Config\path.

For what regedit command is used?

Regedit command is used for opening the Windows registry editor database. You can view and edit this registry editor according to your needs.

Wrapping Up

There are two options for importing and exporting the registry keys: command line and registry editor. And both of these options are demonstrated in this article, so use whichever you like.

The most straightforward method is to open the Registry Editor and choose your desired file, right-click on it, select the Export option, and Save it. To Import, navigate to the Exported folder and double-click on the exported file to import it.

In the comment, let us know if you have any questions or findings regarding this article.

About The Author
Farhan Max is a tech geek with a particular interest in computer hardware. He's been fascinated by gaming since childhood and is now completing his undergraduate studies while researching and testing the latest tech innovations. Alongside his love for all things geeky, Farhan is also a skilled photographer.

Leave a Comment