The windows registry contains several root locations that store various entries.
These locations are called registry hives.Registry hives are separated based on the values they contain.Here is a list of some of the most commonly used registry hives along with a brief description about each one:
Name (Abbreviation) – Description
- HKEY_LOCAL_MACHINE (HKLM) – Contains keys and information related to the entire computer, such as windows configurations or other system wide settings.
- HKEY_CURRENT_USER (HKCU) – Contains keys and information related to the current computer user, such as preferences or settings.
While there are several more registry hives these are the one you will likely be using almost exclusively, so do not stress too much about the rest.
Keys:
Within these hives there are several sub-entries or keys, which categorize our values even further into several groups.
For example, the Software key which is located with the HKEY_LOCAL_MACHINE registry hive contains information and settings related to every application in your computer.
Basically, think of keys like containers or folders.
Values:
Within these keys we have various values, that our applications or windows have created.Sort of like files within a folder.
These values are also called entries and will be using the two names interchangeably.
Entries, store data using several distinct data types, in the following list I have included the name of each value in human-readable format, the name that they are listed as in the registry(within parenthesis) along with a brief description.
- String (REG-SZ) – A combination of numbers, letters and symbols.
- Binary ( REG_RESOURCE_LIST) – Basically a bunch of zeros and ones.
- DWORD (REG_DWORD) – A 32 bit integer number. Can be expressed in either binary or hexadecimal format.
There is no way I can explain this using plain English and fit it into a sentence, instead, if you want to learn more, you would have to go here.
While these are not all the data types, they are the ones which you will likely use most.
Since this article is more about the command line itself and its relation to the registry, I wont dive any deeper into the registry itself.
If you would like to, you can find more information about the registry by clicking here.
With that said you should now have the basics down and be ready for the following sections.