Back

AllFilesystemObjects
 
CLSID
 
 
HKEY_CLASSES_ROOT  

HKEY_CLASSES_ROOT

HKEY_CLASSES_ROOT is one of the more complex root registry keys on a system.

HKEY_CLASSES_ROOT stores a lot of information which is critical to the operation of a Windows machine. Information such as component registration information, context handlers and file associations, GUID information and so fourth is all stored within this key. HKEY_CLASSES_ROOT is an exceptionally large key and caution should be especially exercised when manipulating data within this location.

Prior to Windows 2000 a machine had a single store for items such as component registration information, context handlers, file associations and GUID information which was HKEY_LOCAL_MACHINE \ Software \ Classes. At this point, HKEY_CLASSES_ROOT was actually just a link to HKEY_LOCAL_MACHINE \ Software \ Classes and applications could use either path to store information.

Post Windows 2000, Microsoft introduced the ability to have per-user information for such things (file associations etc...) and therefore introduced HKEY_CURRENT_USER \ Software \ Classes. In fact, this key is also a link / shortcut to another location which is HKEY_USERS \ _Classes which is where the actual registry hive file gets loaded.

Now that we have this functionaility, HKEY_CLASSES_ROOT becomes a little more complicated as it is actually a merged view of both the machine wide key and the per-user key. If you open a registry editor a navigate below HKEY_CLASSES_ROOT you are in fact seeing a merged view of both HKEY_LOCAL_MACHINE \ Software \ Classes and HKEY_USERS \ _Classes.

The HKEY_LOCAL_MACHINE \ Software \ Classes key contains default settings that can apply to all users on the local computer whereas the HKEY_CURRENT_USER \ Software \ Classes key contains settings that override the default settings and apply only to the interactive user.

To change the settings for the interactive user, changes must be made under HKEY_CURRENT_USER \ Software \ Classes (or HKEY_USERS) instead of under HKEY_CLASSES_ROOT. Settings made below HKEY_CLASSES_ROOT are stored in the machine-wide key and not therefore per-user.

There is a caveat however to the above paragraph which is if you write values to a key under HKEY_CLASSES_ROOT, and the key already exists under HKEY_CURRENT_USER \ Software \ Classes, the system will store the information there instead of under HKEY_LOCAL_MACHINE \ Software \ Classes.

For further information about this key see http://support.microsoft.com/kb/256986