The registry contains information on files, software, hardware, profiles and configurations that are regularly accessed by Windows during operation. It is arranged in a hierarchy of registry hives, which are like folders, containing the registry keys that store information. Information in the registry keys can be numbers, values or descriptive names, which must not exceed 255 characters.
The registry is like a database and is grouped according to specific functions, which stores information that can be accessed immediately. Instead of storing information in the memory, which is better used for running processes, Windows stores data on user profiles, installed programs, software, hardware and driver information in the registry. It provides easier access and is better organized than the hard drive without depleting memory resources.
Registry Hive: HKCR
The registry has five registry hives, called root keys, which are organized similarly to the main folders in your hard drive. They are further subdivided into registry keys, very much like your hard drive having a "Program Files" folder with folders in it for your different programs. Their names start with "HKEY," which stands for "Hives Key".
The first one is the HKEY_CLASSES_ROOT (HKCR), which contains information on files associated with the applications installed in your computer. A file extension .DOC, for example, will show a registry string "Content Type"; its associated application in your computer is Microsoft Word. A registry string means that the value that can be contained in it can be letters or numbers.
Registry Hive: HKCU
HKEY_CURRENT_USER (HKCU) stores the profile information of the current user. When the current user installs an application like Microsoft Office, by default, it will be installed in a hard drive directory like C:\Program Files\Microsoft Office. An equivalent registry key is created in HKCU\Software\Microsoft called "Office". The "Office" registry key contains sub-keys listing the Office applications that are installed like Word, Excel or Outlook.
Registry Hive: HKLM
HKEY_LOCAL_MACHINE contains the registry keys of all applications installed in the computer regardless of the user. When an Administrator user installs Microsoft Office for all users, an equivalent registry key is created in HKLM\Software\Microsoft called "Office". Similar to the HKCU "Office" key, it contains sub-keys listing all the applications installed under "Office" like Word, Excel or Outlook. The HKLM hive also stores hardware and system information, listing the hardware drivers that have been installed and services running in your computer. The "Run" key, for example, in HKLM\Software\Microsoft\Windows\CurrentVersion lists the programs that are loaded during startup.
Registry Hive: HKU
HKEY_USERS, like the HKCU, contains user profiles information. HKU, however, stores all user profiles in the computer, not just the current one. It contains the profile information for the Administrator, the Guest, Default Users and everyone else who has created a user name in the computer. Profiles essentially contain the information associated to the user like computer rights and privileges, items in the user's desktop, start menu and shortcuts.
Registry Hive: HKCC
HKEY_CURRENT_CONFIGURATION contains the hardware information that is currently loaded during startup. Information listed in registry keys include the hardware devices like audio and video components, their names, version and settings.
Editing and Backing Up
The registry key is a vital Windows component for running applications. Editing the registry without making a backup first may lead to an unstable computer. Every time you run an application, Windows checks the registry for its associated information before running it. If the registry has been tampered with, some applications or profiles will not run properly. The registry editor can be accessed by typing "regedit" in the "Run" option. To backup the entire registry or portions of the registry, right-click the part you wish to backup and click "Export". This will produce a .REG file, which can be imported back to the registry simply by running it.