HKEY_CLASSES_ROOT, often abbreviated as HKCR , is a registry hive in the Windows Registry and contains file extension association information as well as a programmatic identifier (ProgID), a class ID (CLSID), and an interface ID ( IID).
In the simplest possible terms, the HKEY_CLASSES_ROOT registry hive contains the necessary information for Windows to know what to do when it is asked to do something, like view the contents of a drive, or open a certain type of file, etc.
Getting to HKEY_CLASSES_ROOT
HKEY_CLASSES_ROOT is a registry hive and therefore sits at the top level in Registry Editor, at the root of the entire Windows Registry:
- Open Registry Editor.
The easiest way to do this on all versions of Windows is to open the Run dialog via WIN+R , and enter regedit .
- Find HKEY_CLASSES_ROOT in the left area of Registry Editor.
You may not see it right away if you’ve used the registry recently and left multiple hives or braces open. Press Home on your keyboard to see the HKCR list at the top of the left panel.
- Double click or double tap HKEY_CLASSES_ROOT to expand the hive, or use the small arrow on the left
Registry subkeys in HKEY_CLASSES_ROOT
The list of registry keys under the HKEY_CLASSES_ROOT hive is very long and equally confusing. We can’t explain each of the thousands of keys you may see, but we can break it down into a few manageable parts, which will hopefully clear up this part of the registry a bit.
Here are some of the many file extension association keys you’ll find under the HKEY_CLASSES_ROOT hive, most of which will start with a period:
- HKEY_CLASSES_ROOTdll file
Each of these registry keys stores information about what Windows should do when you double-click or double-click a file with that extension. You can include the list of programs found in the “Open with….” section. when right clicking/tapping a file, and the path to each application listed.
For example, on your computer, when you double-click or double-click a file with the name draft.rtf , WordPad may open the file. The registry data that causes this to happen is stored in the HKEY_CLASSES_ROOT.rtf key , which defines WordPad as the program to open the RTF file.
Due to the complexity of setting the HKEY_CLASSES_ROOT keys, we strongly do not recommend that you change the default file associations from the registry. Instead, see How to Change File Associations in Windows for instructions on how to do this from the normal Windows interface.
HKCR & CLSID, ProgID, & IID
The rest of the keys in HKEY_CLASSES_ROOT are ProgID, CLSID, and IID. Some examples of each of them:
The ProgID keys are located at the root of HKEY_CLASSES_ROOT, along with the file extension associations mentioned above:
All CLSID keys are found under the CLSID subkey :
- HKEY_CLASSES_ROOTCLSID 6C792F8-6212-4F39-BF70-E8C0AC965C23}
All IID keys are found under the Interface subkey :
The ProgID, CLSID, and IID keys are related to some very technical aspects of computer programming and are outside the scope of this discussion. However, you can read more about all three here, here, and here, respectively.
Backup Hive HKEY_CLASSES_ROOT
Without exception, you should always make a backup copy of any registry entry that you plan to edit or delete. See How to Back Up the Windows Registry if you need help backing up HKEY_CLASSES_ROOT, or any other registry location, to a REG file.
If something goes wrong, you can always restore the Windows Registry to a working state with the backup. All you have to do is double click or double tap on that REG file and confirm that you want to make those changes.
More about HKEY_CLASSES_ROOT
Although you can completely edit and delete any subkey within the HKEY_CLASSES_ROOT hive, the root folder itself, like all registry hives, cannot be renamed or deleted.
HKEY_CLASSES_ROOT is a global hive, which means that it can contain information that applies to all users of the computer and is visible to all users. This is in contrast to some hives that have information that only applies to the currently logged in user.
However, because the HKEY_CLASSES_ROOT hive is actually a combination of data found in both the HKEY_LOCAL_MACHINE hive ( HKEY_LOCAL_MACHINESoftwareClasses ) and the HKEY_CURRENT_USER hive ( HKEY_CURRENT_USERSoftwareClasses ), it also contains user-specific information. Even if that is the case, the HKEY_CLASSES_ROOT can be browsed by any and all users.
This means, of course, that when a new registry key is made in the HKEY_CLASSES_ROOT hive, it will appear in HKEY_LOCAL_MACHINESoftwareClasses , and when one is deleted, the same key is removed from the other location.
If a registry key resides in both locations, but conflicts in some way, the data found in the logged in user’s hive, HKEY_CURRENT_USERSoftwareClasses , takes precedence and is used in HKEY_CLASSES_ROOT.