Originally posted on November 9, 2020 @ 7:53 am

Windows Registry is a database of information concerning various configurations of PC settings and applications for systems running on Microsoft’s Windows operating system. Though not every app needs to be run on a configuration database stored on Windows registries (some store the configuration data in XML files or a separate executable file), the registries play a vital role in the proper functioning of your Windows PC.

Windows offer users an option to edit these registries in case they want to change the configuration settings for an application or program on their computer. Let’s learn more about how you can use these registries and edit them as per your choice:

How Do Windows Registries Work?

The information stored in Windows registries is organized on three different registry levels:

These are a collection of keys, subkeys, and registry values, represented by folders. These folders are categorized into subfolders depending on the type of data values they hold.

These are those subfolders that makeup Registry Hives. These are considered to be the standard unit of organization in windows registries. These are like the folders in the Windows File Explorer which holds different types of files on your computer. Similarly, Registry Keys holds the registry values.

These are the instructions or information of configurations and system settings. Each registry value holds instruction for particular system settings, application, or associated configurations.

Read More: How to Add, Modify, & Delete Registry Keys & Values via Regedit

How to Edit Windows Registry Using Command Prompt?

In case, you need to tweak the Windows Registry; you can navigate through the process via the command prompt on a Windows 10 PC. All you need to do is follow the procedure below:

Read Also:   How to use a GoPro camera as your webcam on a Mac

Opening the Command Prompt

How to Edit Windows Registry Via Command Prompt, WPFaqhub

First, Head to the Windows Search Bar.

Then, type cmd in the search bar. Search results will show Command Prompt as the top result.

Right-click on the Command Prompt option and click on Run as Administrator.

This will open up the command prompt on your Windows PC in admin mode.

Read More: How to Change Command Prompt Background

Operation Types to Edit Registries

Step 1: Run the following command to get all the list of operations you can perform to edit Windows Registry.

REG /?

Operation Types define what changes you need to make in a Windows Registry, for example, adding a subkey via the Add operation type.

How to Edit Windows Registry Via Command Prompt, WPFaqhub

Step 2: The command prompt will display all the operations along with the Return Code for each of those commands. Return Codes determine whether the command execution failed or succeeded.

Note: Microsoft provides the content in the tables below

AddAdds a new entry to the registry
CompareCompares two or more registry subkeys or entries.
CopyCopies a registry entry to a specified location on a local or remote machine.
LoadWrites saved subkeys and entries into a different subkey in the registry. This is intended to be used with temp files that are used for troubleshooting or editing registry entries.
Restore Writes saved subkeys and entries back to the registry.
QueryReturns a list of the next tier of subkeys and entries that are located under a specified subkey in the registry.
ImportCopies the contents of a file that contains exported registry subkeys, entries, and values into the registry of the local computer.
ExportCopies the specified subkeys, entries, and values of the local computer into a file for transfer to other servers.
SaveSaves a copy of specified subkeys, entries, and values of the registry in a specified file.
DeleteDeletes a subkey or entries.
UnloadRemoves a section of the registry that was loaded using the REG LOAD  operation.
Read Also:   The Best USB Lock Software With Password Protect Flash Drive

Source: Microsoft

Return CodesResults

Source: Microsoft

Finding Syntax

To find a syntax, all you need to do is add the Operation Name in between the previous REG command. Just like this –

REG <Operation>

This particular step will produce all the information you need about that particular operation, including all the parameters and syntax. Let’s find the syntax by taking the example of the Add operation type.

Executing An Edit Task Using Operation Types: Adding a Subkey or Entry

Step 1: You can add a subkey to the registry via the Add operation. To begin with an edit, you need to put the operation type in between the REG command.

Since we’re using the Add operation type, you need to type the command –

REG <Add>

Step 2: The Syntax is right there in the second line of the prompt – 

REG ADD <KeyName> [{/v ValueName | /ve}] [/t DataType] [/s Separator] [/d Data] [/f]

How to Edit Windows Registry Via Command Prompt, WPFaqhub

Here –

  • <KeyName> specifies the path of the subkey. Usually, the root keys used as a path are designated by HKLM or HKU.
  • /v ValueName specifies the name of the subkey.

The other syntax parameters are not needed in case of Add operation type.

Step 3: Assuming your subkey name is – MySubkey; the command that’ll go with the operation type will be –

REG ADD HKLMSoftwareMySubkey

Deleting a Subkey

Step 1: The syntax of Delete operation is –

REG DELETE <KeyName> [{/v ValueName | /ve | /va}] [/f]

How to Edit Windows Registry Via Command Prompt, WPFaqhubStep 2: Assuming you need to delete the same subkey you created in the previous step; the command will be –


Step 3: Type YES to confirm the delete command.

Read Also:   5 Streaming Audio Recorders On Windows

Step 4: Press Enter.

These are just two operations. Every operation requires a different syntax which you now know how to figure out, and each carries out different tasks. You can visit this document published by Microsoft to learn more about Registry Operation Types, Syntax, and Parameters.

Read More: How to Fix Registry Errors in Windows 10

Disclaimer: Why Refrain from Tweaking  Windows Registries?

Any change you make in Control Panel Settings, system associations, software or app installations, etc. are automatically reflected in the Windows Registry. In case, you try to edit the Windows Registries manually; you may end up corrupting any of these settings, configurations, and system policies. This can lead to several computer problems, such as system crashes, corrupt applications, unbootable drives, problems in saved files and system folders.

Hence it is recommended that you do not try to tweak the Windows Registry unless you are entirely aware of all the syntax and parameters or you are not in dire need to do it.

You May Also Like

Why Fixing Registry Issues Is Important

How to Change Windows Password Without Knowing Current Password

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

The above article may contain affiliate links which help support WPFaqhub. However, it does not affect our editorial integrity. The content remains unbiased and authentic Learn More

I'm not perfect but I'm limited edition. I'm the fountainhead of WPFaqhub. A blog scientist by the mind and a passionate blogger by heart ❤️. Even more, I'm a Career Expert.