Understanding the Windows Registry is essential for any serious user or administrator troubleshooting system issues, and the journey to locate specific settings often begins with the question: where is hkey.
The Registry Hierarchy Explained
The Windows Registry is not a single database but a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The topmost levels are known as hives, and they define the logical structure you see when you open the Registry Editor. Before you can ask where is hkey, you must understand that "hkey" is a root node, not a specific location, acting as a starting point for five primary branches that manage different categories of data.
Breaking Down the Five Root Keys When you open the Registry Editor by typing "regedit" into the Run dialog, you are presented with a tree view starting at the root level. These are the five main hkeys you will encounter, each serving a distinct purpose in the operating system's architecture. HKEY_CLASSES_ROOT (HKCR): This hive combines information from the main System Registry and the current user’s settings. It defines file associations and COM class registration, essentially telling Windows which program opens which file type. HKEY_CURRENT_USER (HKCU): This is a direct link to the configuration for the user currently logged in. It stores per-user settings for the desktop, control panel, and applications, making it dynamic and user-specific. HKEY_LOCAL_MACHINE (HKLM): Perhaps the most critical hive for system stability, HKLM contains configuration data for the local computer. This includes hardware settings, installed software, and security policies that apply to all users. HKEY_USERS (HKU): This hive contains the root of the hives for all users on the machine. The default user profile is stored here, along with the active settings for the current user, which are dynamically linked to HKCU. HKEY_CURRENT_CONFIG (HKCC): This is a volatile hive that stores information about the current hardware profile. It is essentially a pointer to the specific configuration loaded from HKLM at boot time, focusing on hardware and display settings. Locating the Hives on Your System
When you open the Registry Editor by typing "regedit" into the Run dialog, you are presented with a tree view starting at the root level. These are the five main hkeys you will encounter, each serving a distinct purpose in the operating system's architecture.
HKEY_CLASSES_ROOT (HKCR): This hive combines information from the main System Registry and the current user’s settings. It defines file associations and COM class registration, essentially telling Windows which program opens which file type.
HKEY_CURRENT_USER (HKCU): This is a direct link to the configuration for the user currently logged in. It stores per-user settings for the desktop, control panel, and applications, making it dynamic and user-specific.
HKEY_LOCAL_MACHINE (HKLM): Perhaps the most critical hive for system stability, HKLM contains configuration data for the local computer. This includes hardware settings, installed software, and security policies that apply to all users.
HKEY_USERS (HKU): This hive contains the root of the hives for all users on the machine. The default user profile is stored here, along with the active settings for the current user, which are dynamically linked to HKCU.
HKEY_CURRENT_CONFIG (HKCC): This is a volatile hive that stores information about the current hardware profile. It is essentially a pointer to the specific configuration loaded from HKLM at boot time, focusing on hardware and display settings.
While the logical structure exists in memory, the physical files reside in specific directories on your hard drive. If you are trying to understand where is hkey in terms of actual file storage rather than the editor view, the paths are standardized across Windows versions. The system hive, which contains HKLM and HKU, is typically located in the %SystemRoot%\System32\Config folder. User-specific hives, which form the basis of HKCU, are found in the user's profile directory under NTUSER.DAT.