Software & Apps > Windows 75 75 people found this article helpful What Is a Registry Key? How the Windows Registry is structured with registry keys By Tim Fisher Tim Fisher Facebook Twitter Senior Vice President & Group General Manager, Tech & Sustainability Emporia State University Tim Fisher has more than 30 years' of professional technology experience. He's been writing about tech for more than two decades and serves as the VP and General Manager of Lifewire. lifewire's editorial guidelines Updated on October 12, 2021 Tweet Share Email Tweet Share Email Windows The Ultimate Laptop Buying Guide A registry key can be thought of as being a bit like a file folder, but it exists only in the Windows Registry. Registry keys contain registry values, just like folders contain files. Registry keys can also contain other registry keys, which are sometimes referred to as subkeys. Registry keys work the same way in all versions of Windows. There have been some changes in how you collapse and expand registry keys, but these were very minor and didn't affect their function. Structure of the Windows Registry The Windows Registry is structured in a hierarchy, with the topmost registry keys referred to as registry hives. These have special rules attached to them, but they're registry keys in every other sense. The term "registry entry" can refer to any individual part of the Windows Registry (like a hive or value) but usually, it's synonymous with a registry key. Items in the registry are structured in this way: KEY(HIVE)\SUBKEY\SUBKEY\...\... Let's look at a specific example from Registry Editor to help explain how registry keys work: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft As you can see, the registry path shown above is divided into three sections, each separated by a backslash: HKEY_LOCAL_MACHINESOFTWAREMicrosoft Each section represents a single registry key, with the right-most one nested under the one prior, and so on. Thinking about it another way: Each key is under the one to the left, just like a path on your computer works, like C:\Windows\System32\Boot. The first registry key, HKEY_LOCAL_MACHINE, is at the top of the path and is a registry hive. Nested under HKEY_LOCAL_MACHINE is the SOFTWARE registry key. The Microsoft key is yet another registry key nested under the SOFTWARE key. Registry keys are not case sensitive, which means it doesn't matter if letters are uppercase and lowercase; they can be written either way without affecting how they work. Registry keys can be nested quite deeply. Here's an example of a registry key five levels deep that you'll find in any Windows computer's registry under the HKEY_CURRENT_CONFIG hive: HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\Print\Printers You can change how your Windows system functions on some very fundamental levels by adding, changing, and deleting registry keys. However, you must take great care when tinkering with the registry, because you can cause serious problems in your computer that could result in a loss of all data. Backing Up and Restoring Registry Keys It's wise to back up your registry before making any changes in it. With a copy of the keys you're changing in hand, you can feel safe knowing you can undo any changes that might result in problems in your system. You don't have to back up the entire registry if you don't want to; you can back up just the registry keys you're working with. Your backed up registry keys exist as a REG file. You can easily restore backed-up registry keys by opening the REG file and following the prompts, and it can be done no matter which version of Windows you're using. FAQ How do I add a key? In Windows, use the Windows+R keyboard shortcut to open the Registry Editor, then enter regedit > OK. In the left pane, navigate to the registry key you want to add > right-click the key > select New > Key. What are the five registry keys? In most versions of Microsoft Windows, the following keys are in the registry: HKEY_CLASSES_ROOT (HKCR), HKEY_CURRENT_USER (HKCU), HKEY_LOCAL_MACHINE (HKLM), HKEY_USERS (HKU), and HKEY_CURRENT_CONFIG. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Email Address Sign up There was an error. Please try again. You're in! Thanks for signing up. There was an error. Please try again. Thank you for signing up! Tell us why! Other Not enough details Hard to understand Submit