How to Add, Change, and Delete Registry Keys and Values

Sometimes, as part of a troubleshooting step or a registry hack, you need to do some kind of "work" on the Windows Registry. Perhaps you're adding a new registry key to fix a bug in the way Windows handles something, or removing a malicious registry value that's causing problems with a hardware or software program.

Regardless of what you do, most people find the registration process a bit overwhelming; It is huge and looks very complex. Also, you've probably heard that even the slightest mistake on your part could render your computer unusable.

Do not be afraid! It really isn't hard to make changes to the registry if you know what you're doing. Follow these steps to change, add, or delete parts of the Windows registry:

Note: The instructions work the same no matter what version of Windows you're using. The differences between these registry editing tasks in Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP are mentioned below.

Always Backup the Registry First (Yes, Always)

Hopefully that was your first thought, too, but before you tackle the tasks described in the next few sections, start by backing up your registry.

Basically, it involves selecting the keys you want to remove or change, or even the entire registry, and then exporting them to a .reg file. 

If your registry changes don't go your way and you need to revert your changes, you'll be glad you were proactive and decided to make a backup.

How to Add New Registry Keys and Values

Randomly adding a new registry key or collection of registry values ​​probably won't hurt you, but it won't do you much good either.

However, there are some cases where you might add a registry value or even a new registry key to the Windows registry to accomplish a very specific goal, usually to enable a feature or fix a problem.

For example, an early bug in Windows 10 caused two-finger scrolling on the touchpad to stop working on some Lenovo laptops. The fix involved adding a new registry value to a specific registry key that already existed.

Whichever tutorial you follow to fix any problem or add any feature, here's how to add new keys and values ​​to the Windows registry:

  1. Run regedit to start the registry editor. See How to Open Registry Editor if you need help. 


  2. On the left side of the editor, navigate to the registry key to which you want to add another key, usually called a subkey, or to the key to which you want to add a value.

    Note: You cannot add additional top-level keys to the registry. These are special keys called registry hives and are defaulted by Windows. However, you can add new values ​​and keys directly under an existing registry hive.

  3. Once you've found the registry key you want to add, you can add the key or value you want to add:

    If you're creating a new registry key, right-click or tap and hold the key you want it to exist in and select New > Key. Give the new registry key a name, and then press Enter.

    If you are creating a new registry value, right-click or tap and hold the key where you want it to exist and select New, followed by the type of value you want to create. Give the value a name, press Enter to confirm, then open the newly created value and set the value data you want it to have.


  4. Close the open Registry Editor window.

  5. Reboot your computer unless you are sure that the new keys and/or values ​​you added do not require a reboot to do what they are supposed to do. Only do it if you're not sure.

Hopefully everything you were trying to accomplish with these registry additions worked, but if not, check that you added the key or value to the correct area of ​​the registry and that you named this new data correctly.

How to Rename and Make Other Changes to Registry Keys and Values

As you read above, adding a new key or value that doesn't have a purpose usually doesn't cause a problem, but renaming an existing registry key or changing the value of an existing value, will do something.

Hopefully this is what you're looking for, but we want to stress that you need to be very careful when modifying existing parts of the registry. These keys and values ​​already exist, probably for a good reason. So make sure that any advice that got you to this point is as accurate as possible.

Provided you are careful, you can make several types of changes to existing keys and values ​​in the Windows registry:

  1. Run regedit to start the registry editor. Anywhere you have access to the command line, it works fine. 

  2. On the left side of Registry Editor, locate the key that you want to rename, or the key that contains the value that you want to change in some way.

    Note:
    You cannot rename registry hives, which are the top-level keys in the Windows registry.

  3. Once you have found the part of the registry that you want to make changes to, you can make those changes:

    To rename a registry key, right-click or touch and hold the key and select Rename. Give the registry key a new name, and then press Enter.

    To rename a registry value, right-click or touch and hold the value to the right and select Rename. Give the registry value a new name, and then press Enter.

    To change the data of a value
    , right click or touch and hold the value to the right and select Modify.... Assign a new value data and then confirm with the OK button.


  4. Close Registry Editor when you're done making changes.

  5. Restart your computer. Most registry changes, especially those that affect the operating system or its dependent parts, don't take effect until you restart your computer, or at least log out of and then back into Windows.

Assuming the keys and values ​​you made changes to did something before you changed them, expect some sort of behavior change after you restart your PC. If this behavior isn't what you were looking for, it's time to dig up the backup you created.

How to Delete Registry Keys and Values

As crazy as it sounds, sometimes it's necessary to delete a registry key or value, mainly to fix a problem that's probably caused by a program that added a specific key or value that it shouldn't have.

The problem with the UpperFilters and LowerFilters values ​​first comes to mind. These two registry values, when found in a very specific key, are often the main cause of certain errors that are sometimes seen in Device Manager.

Don't forget to back up and then follow these exact steps to delete a key or value from the Windows registry:

  1. Start Registry Editor by running regedit from any command line area in Windows. 

  2. In the left pane of Registry Editor, drill down until you find the registry key that you want to delete or the key that contains the registry value that you want to delete.

    Note: You cannot delete the registry hives, the top-level keys that you see in Notepad.

  3. Once you find it, right click or tap and hold and select Delete.

    Important: Remember that registry keys are very similar to folders on your computer. If you delete a key, you also delete all the keys and values ​​it contains! That's great if that's what you want to do, but if not, you may have to dig a little deeper to find the keys or values ​​you were really looking for.

  4. You will then be prompted to confirm the request to delete the key or value with a key delete confirmation message or a value delete confirmation message in one of the following ways:

    Are you sure you want to permanently delete this key and all of its subkeys?

    Deleting certain registry values ​​can cause system instability. Are you sure you want to permanently delete this value?

    On Windows XP, these messages are slightly different:

    Are you sure you want to delete this key and all its subkeys?

    Do you really want to remove this value?

  5. Regardless of the message, choose Yes to delete the key or value.


  6. Restart your computer. The kind of things that benefit from deleting a value or key are usually the kind of things that require a PC reboot to take effect.

Did Your Registry Edits Cause Problems (or Not Help)?

Hopefully the answer to both questions is no, but if not, it's very easy to undo what you've changed, added, or deleted from the Windows registry, assuming you've backed up what we mentioned above first.

Find the .reg file that your backup created and run it, which will return those saved sections of the Windows registry to where they were before you did anything.

Comments

Popular posts from this blog

What is a Server?

What is POP - Post Office Protocol ?

What are the Outlook.com POP Server Settings?