Difference between a registry Hive and a registry Key


The Windows registry is divided into several root keys. They can also be called Hives.

The  hives are as follows:

Registry Hive Abbreviation Files Associated Comments
HKEY_CLASSES_ROOT HKCR N/A File name ext/assoc.
HKEY_CURRENT_USER HKCU Ntuser.dat, Ntuser.dat.log Settings interactive users
HKEY_LOCAL_MACHINE\Hardware HKLM-Har N/A hardw data recr. during each startup
HKEY_LOCAL_MACHINE\SAM HKLM-Sam Sam, Sam.log, Sam.sav Security Accounts Manager
HKEY_LOCAL_MACHINE\Security HKLM-Sec Security, Security.log, Security.sav Password Related
HKEY_LOCAL_MACHINE\Software HKLM-Soft Software, Software.log, Software.sav Software Configuration
HKEY_LOCAL_MACHINE\System HKLM-Sys System, System.alt, System.log, System.sav Stores drivers and services inf.
HKEY_USERS\.DEFAULT HKU-Def Default, Default.log, Default.sav profile for the Local System acct
HKEY_CURRENT_CONFIG HKCC N/A Config. data for current hard prf
HKEY_USERS HKU N/A Inform. and settings of all users
HKEY_PERFORMANCE_DATA HKPD N/A NT based OS; invisible
HKEY_DYN_DATA HKDD N/A Win 9x/Me only

“Registry keys are similar to folders — in addition to values, each key can contain subkeys, which may contain further subkeys, and so on” ( wikipedia )

The hierarchy of registry keys can only be accessed from a known root key handle or a Hive.

E.g. HKEY_LOCAL_MACHINE\Software\Adobe\Adobe Reader refers to the subkey “Adobe Reader” of the subkey “Adobe” of the subkey “Software” of the HKEY_LOCAL_MACHINE root key.

So, a registry Hive is higher in the registry hierarchy than a registry key. A registry key is normally contained inside of a registry hive or a root key

Good source of information about the registry: technet

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: