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:

  • Registry Hives:

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.

  • Registry Keys:

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.

  • 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:

Opening the Command Prompt

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.

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

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

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

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

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

Here –

  • 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 HKLM\Software\MySubkey

Deleting a Subkey

Step 1: The syntax of Delete operation is –

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

Step 2: Assuming you need to delete the same subkey you created in the previous step; the command will be –

REG DELETE HKLM\Software\MySubkey

Step 3: Type YES to confirm the delete command.

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.

Why Fixing Registry Issues Is Important

How to Change Windows Password Without Knowing Current Password

People Who Read This Post Also Like