How to Add, Change, & Delete Keys and Values in the Windows Registry (2024)

Sometimes, as part of a troubleshooting step, or a registry hack of some kind, you may need to do some typeof "work" in the Windows Registry. Maybe it's adding a newregistry keyto fix some kind of bug with how Windows handles something ordeleting a rogueregistry valuethat's causing problems with a piece of hardware or a software program.

Regardless of what you're doing, most people find the registry a bit overwhelming; it's huge and seems very complex. Plus, you've probably heard even the slightest mistake in there on your part could render your computer useless.

Do not fear! It's really not difficult to make changes in the registry if you know what you're doing. Follow the steps below to modify, add to, or delete parts of the Windows Registry:

The directions work the same way no matterwhich version of Windows you're using. Any differences will be called out below between these registry editing tasks inWindows 11, Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP.

Always Back up the Registry First (Yes, Always)

Hopefully, this was your initial thought as well, but before you get into any of the specific to-dos outlined in the next several sections, start by backing up the registry.

Basically, this involves selecting the keys you'll be removing or making changes to, or even the entire registry itself, and then exporting it to a REG file.See How to Back Up the Windows Registry if you need help.

If your registry edits don't go well and you need to undo your changes, you'll be very happy you were proactive and chose to back up.

How to Add New Registry Keys and Values

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

However, there are a few instances 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 made two-finger scrolling on the touchpad on some Lenovo laptops stop working. The fix involved adding a new registry value to a specific, pre-existing registry key.

No matter what tutorial you're following to fix whatever issue, or add whatever feature, here's how to add new keys and values to the Windows Registry:

  1. Executeregeditto start Registry Editor. SeeHow to Open Registry Editorif you need help.

    How to Add, Change, & Delete Keys and Values in the Windows Registry (1)

  2. On the left side of the editor, navigate to the registry key you want to add another key to, usually referred to as asubkey, or the key you want to add a value to.

    You can't add additional top-level keys to the registry. These are special keys, called registry hives, and are preset by Windows. You can, however, add new values and keys directly under an existing registry hive.

  3. Once you've located the registry key you want to add to, 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 on the key it should exist under and chooseNew> Key. Name the new registry key and then pressEnter.
    • If you're creating a new registry value, right-click or tap-and-hold on the key it should exist within and chooseNew, followed by the type of value you want to create. Name the value, pressEnterto confirm, and then open the newly created value and set theValue datait should have.

    How to Add, Change, & Delete Keys and Values in the Windows Registry (2)

    See What Is a Registry Value? for more on registry values and the different types of values, you can choose from.

  4. Close the open Registry Editor window.

  5. Restart your computer, unless you're sure the new keys and/or values you've added won't need a restart to do whatever it is they're supposed to do. Just do it if you're not sure.

Hopefully, whatever thing you were trying to accomplish with these registry additions worked out, but if not, check again that you added the key or value to the correct area of the registry and that you've named this new data properly.

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

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

Hopefully, that somethingis what you're after, but we make this point to stress that you should be very careful when changing existing parts of the registry. Those keys and values are already there, presumably for a good reason, so make sure whatever advice you've gotten that led you to this point is as accurate as possible.

So long as you're careful, here's how to make different kinds of changes to existing keys and values in the Windows Registry:

  1. Executeregeditto start Registry Editor. Anywhere you have command line access will work fine. SeeHow to Open Registry Editorif you need help.

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

    You can't rename registry hives, the top-level keys in the Windows Registry.

  3. Once you've located the part of the registry you want to make changes to, you can actuallymakethose changes:

    • To rename a registry key, right-click or tap-and-hold on the key and choose Rename. Give the registry key a new name and then pressEnter.
    • To rename a registry value, right-click or tap-and-hold on the value on the rightand chooseRename. Give the registry value a new name and then pressEnter.
    • To change a value's data,right-click or tap-and-hold on the value on the rightand chooseModify.... Assign a newValue dataand then confirm with the OKbutton.

    How to Add, Change, & Delete Keys and Values in the Windows Registry (3)

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

  5. Restart your computer. Most changes to the registry, especially those that impact the operating system or its dependent parts, won't take effect until you've restarted your computer, or at least signed out and then back into Windows.

Assuming the keys and values you made changes to were doing something prior to your change, expect some kind of change in behavior after you restart your PC. If that behavior isn't what you were after, it's time to dig up that backup you made.

How to Delete Registry Keys & Values

As crazy as it sounds, you might sometimes need to delete a registry key or value, most often to fix a problem, likely caused by a program thataddeda particular key or value it shouldn't have.

The UpperFilters and LowerFilters valuesissue comes to mind first. These two registry values, when located in a very particular key, are regularly the root cause of certain errors you'll sometimes see in Device Manager.

Don't forget to back up, and then follow these steps exactly to remove a key or value from the Windows Registry:

  1. Start Registry Editor by executingregeditfrom any command-line area in Windows. See How to Open Registry Editor if you need a bit more help than that.

  2. From the left pane in Registry Editor, drill down until you locate the registry key you want to delete or the key that contains the registry value you want to remove.

    You can't delete registry hives, the top-level keys you see in the editor.

  3. Once found, right-click or tap-and-hold on it and chooseDelete.

    Remember, registry keys are a lot like the folders on your computer. If you delete a key, you'll also delete any keys and values that exist within it! That's great if that's what you want to do, but if not, you may need to dig a bit deeper to find the keys or values you were really after.

  4. Next, you'll be asked to confirm the key or value deletion request, with either a Confirm Key Delete or Confirm Value Delete message, respectively, in one of these forms:

    • Are you sure you want to permanently delete this key and all of its subkeys?
    • Deleting certain registry values could cause system instability. Are you sure you want to permanently delete this value?

    In Windows XP, these messages are slightly different:

    • Are you sure you want to delete this key and all of its subkeys?
    • Are you sure you want to delete this value?
  5. Whatever the message, select Yesto delete the key or value.

    How to Add, Change, & Delete Keys and Values in the Windows Registry (4)

  6. Restart your computer. The kind of thing that benefits from a value or key removal is usually the kind of thing that requires a PC restart to take effect.

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

Hopefully, the answer to both questions isno, but if not, undoing what you've changed, added, or removed from the Windows Registry is super easy, assuming you backed up, which we recommended above as the first thing you should do.

Dig up that REG file your backup created and execute it, which will restore those saved sections of the Windows Registry back to where they were before you did anything.

SeeHow to Restore the Windows Registryif you need more detailed help restoring your registry backup.

FAQ

  • What registry key is created when a Windows user logs in?

    Registry keys for Windows users are created under a different name based on the situation. HKEY_CURRENT_USER (abbreviated as HKCU) is for the currently logged-in user. Other active (but not logged in) user accounts are saved under HKEY_USERS (abbreviated HKU), which HKCU is a subkey of.

  • How do I clean up my Windows registry?

    The short answer is: Don't. Microsoft does not support or condone the use of registry cleaning utilities. Registry cleaners could, at best, not solve your issue or make things worse, and at worst infect your PC with malware, spyware, or viruses. The best approach is to figure out the specific registry problems and address them directly.

Was this page helpful?

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Tell us why!

How to Add, Change, & Delete Keys and Values in the Windows Registry (2024)
Top Articles
Latest Posts
Article information

Author: Nicola Considine CPA

Last Updated:

Views: 5977

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Nicola Considine CPA

Birthday: 1993-02-26

Address: 3809 Clinton Inlet, East Aleisha, UT 46318-2392

Phone: +2681424145499

Job: Government Technician

Hobby: Calligraphy, Lego building, Worldbuilding, Shooting, Bird watching, Shopping, Cooking

Introduction: My name is Nicola Considine CPA, I am a determined, witty, powerful, brainy, open, smiling, proud person who loves writing and wants to share my knowledge and understanding with you.