Windows Registry Keys

The Windows registry is used to store values required by the operating system, installed programs, hardware devices, and a variety of other system components to function correctly. This hierarchical database is composed of a combination of keys and values. Although the tree structure displayed in the Windows Registry Editor is easy to navigate, the information doesn’t mean much if you don’t understand what the root-level Windows registry keys are used for. Here is a little more information to help you understand this structure:

Accessing the Windows Registry
To get a good look at the information stored in the Windows registry, use regedit.exe to open the Windows Registry Editor. Simply click “Start,” type in “regedit.exe,” and press “Enter.” If you’re running Windows XP or any older version of Windows, click “Run” after “Start” before entering the executable name.

What is a Key
As mentioned earlier, the Windows registry is made up of a combination of keys and values. Although this file structure is technically considered a database, it can be compared to a standard directory structure. If you think of a key as a folder and a value as a file or the contents of a file, you’ll be fine.

The Seven Predefined Root Keys
Depending on the Windows operating system your machine is running, the registry could have up to seven predefined root keys. Going forward, Microsoft may choose to expand this area to include more root keys, but they will probably not eliminate any. This standard naming convention makes it much easier for programs to run on multiple platforms. A major change to the existing structure would mean many applications would have to be completely redesigned for a Windows release.

Key 1 – HKEY_LOCAL_MACHINE – HKLM
This root key stores settings that are specific to an individual computer. The HKLM is held in memory instead of written to disc, and installed programs aren’t allowed to create any subkeys in this section of the registry. Depending on your version of Windows, the HKLM can have up to six subkeys including:

  • SAM – This subkey appears empty to most users. It is used with the security and accounts management databases.
  • SECURITY – This is more security-related information that appears blank to most users.
  • SYSTEM – This information is created by users with administrative privileges. It includes the Windows settings, file system information, and critical hardware configurations as well as other information needed to run the core system.
  • SOFTWARE – This area is used by both Windows and application programs to store critical configuration settings.
  • HARDWARE – This subkey contains relevant information on all connected plug-and-play devices.
  • BCD – This subkey stores the boot configuration data.

Key 2 – HKEY_CURRENT_CONFIG – HKCC
The HKCC stores information collected at runtime about the computer’s current configuration settings. Each time the computer reboots, this information is regenerated.

Key 3 – HKEY_CLASSES_ROOT – HKCR
The HKCR keeps track of file-name extension associations and class registrations to help connect items with the appropriate application. For the most part, it is used for compatibility in 16-bit Windows systems.

Key 4 – HKEY_USERS – HKU
The HKU includes information about every active user profile stored on the machine.

Key 5 – HKEY_CURRENT_USER – HKCU
The HKCU stores information related to the user who is currently signed onto the system. It contains a subset of the information contained in the HKU area.

Key 6 – HKEY_PERFORMANCE_DATA
You can’t see this key in the Windows Registry Editor, but it can be viewed using the Task Manager or the Performance Monitor. It collects runtime information to generate performance data that can tell you how your machine is performing.

Key 7 – HKEY_DYN_DATA
Only used by Windows ME, Windows 95, and Windows 98, this key stores information about hardware devices and network performance. The data is created dynamically each time the computer is started.

More Information about Windows Registry Keys:

Although knowing a little bit about the root keys can help you get started, you should also keep these things in mind when working with the Windows registry:

  • The subkeys can go down multiple levels before a value is reached.
  • Keys are case sensitive; registry values are not.
  • Deleting a subkey will delete any subordinate subkeys or values, also known as children.
  • Cluttered or corrupted registries are the primary cause of computer errors, freezes, and crashes.
  • Special programs called registry cleaners are often used to maintain the registry.
  • Before modifying the registry, users should create a restore point to act as a registry backup in the event they make a mistake.