The Windows Registry is a hierarchical database in which configuration settings, options to run applications and commands are stored. It is dynamic and exists only when Windows is running. The Windows Registry resembles a subtree with five main branches and looks like Windows Explorer.
Also Learn: What is Windows Registry?
Before discussing Windows registry in detail, let’s understand some of the vocabularies which is used while dealing with the Registry:
The five main root keys of registry are:
Note: HKEY stands for “Handle to Registry Key”
HKEY_CLASSES_ROOT or HKCR is an alias (i.e. a reference) to HKEY_LOCAL_MACHINE\Software\Classes. A separate root key is added so that software developers have direct access to this data, without dipping into HKLM (HKEY_LOCAL_MACHINE). HKCR contains data related to applications, shortcuts, and file extension associations (i.e. what file type is opened with which application). The HKCR keeps track of the file name extension associations and class registrations to connect items with the appropriate application.
HKCU contains data specific to each user with a logon account on your PC. It stores information related to the user who is currently logged into the computer. Right from the appearance aspect to how the mouse pointer behaves, everything can be controlled via this root key.
This key yields data like application events, keyboard layout, mapped network drives, application preferences (Software), and user-specific settings.
HKEY_LOCAL_MACHINE or HKLM is one of the most accessed registry hives. This registry root key contains all the computer-specific information about the hardware installed, software settings, and other information. Depending on your version of Windows, the HKLM can have up to six subkeys including:
The HKU contains information about all the users who log on to the computer. HKEY_USERS is the home of group policy settings. Any Group Policy based rules are generally stored under this root key. When you log on, these settings are copied over to HKCU (HKEY_CURRENT_USER).
When you expand HKU, you’ll see a .DEFAULT folder, as well as entries for each user/log on ID. The .DEFAULT folder contains the base settings for new users when they first logon, S-1-5-21- folders contain settings for user IDs:
HKEY_CURRENT_CONFIG or HKCC contains the current hardware profile settings which have the details about the current configuration of hardware attached to the computer. It is mainly empty and gets activated at boot time, during which it loads the ‘hardware profiles’ sub key of the HKLM.
(Note: If your PC has multiple hardware profiles, they are numbered ControlSet002, ControlSet003 etc.)
The Registry is complicated and should be respected, but there is no reason to fear from it if you take time to understand it.