Most of us have heard about the mysterious and rather chaotic Windows registry. We will almost always find mentions of it on guides with advanced Windows hints and tips. In this guide, we will examine the Windows registry, its purpose and uses, and answer once and for all the question regarding the usefulness of all the "registry cleaner" applications.
Table of Contents
- What is the Windows registry?
- What is the use of the Windows registry
- How to access, backup, and edit the Windows registry
- The basic internal structure of the Windows registry
- Should I use a registry cleaner?
- Do you have any questions about the Windows registry or registry cleaners?
What is the Windows registry?
The Windows registry, simply put, is a database. It contains settings and options for the operating system, each user account, and most of the installed applications.
In the Windows registry we will find all sorts of information, including, but not limited to:
- All installed programs
- All device drivers
- Windows services
- Windows security features
- Known file extensions, and which program can open each file
- The individual settings of the installed applications for each user
- Each Windows user's details and settings
The entries in the Windows registry are also the reason we need to install most programs. It is installation process that creates the necessary registry entries for each application.
On macOS, where there is no registry, installing most apps is just a matter of copying the program to the "Applications" folder. We rarely have to use a full installer.
On Windows, if we simply copy the files and folders of an installed program to another computer, the program will usually not work, because it will not find the appropriate entries in the Windows registry.
Even if we simply rename the program folder or manually transfer it to another folder or another disk on the same PC, it will lose contact with its Windows registry entries, and it will have the same problems in its operation as if we copied it to a different PC.
For the same reason, we can not back up the programs before the formatting the hard drive and reinstalling Windows. Formatting deletes the registry information, so we have to reinstall most of our programs from scratch in the new installation.
Another use of the Windows registry is in trial-run programs. The date and time information that the application logs during the installation often prevents us from "resetting" the trial by deleting and reinstalling the program.
Of course, using the Windows registry is not mandatory for all programs. Some applications that are certainly not using the Windows registry are the so-called "portable" apps.
These kinds of programs, instead of using the Windows Registry, store their settings in files within the application's folder. So, not only we can run them directly, without an installation, but we can copy and execute them on any computer, or even run them from a USB flash drive.
However, portable programs are the exception, not the rule.
What is the use of the Windows registry
The Windows Registry made its first appearance in Windows 3.1. Its original goal was to store settings for programs based on the Component Object Model (COM) platform.
It was in Windows 95 and Windows NT that the Windows registry began to take its current form. Until then, the applications stored their settings as plain text in .ini files. In fact, these files were usually stored centrally, and they did not allow separate settings for different users.
The Windows registry contents are spread out in several smaller files. The system, however, treats the registry as a single virtual location.
The data is distributed in such a way that it separates and groups the settings for the computer, the common settings of all users, and the settings of each user.
When booting the operating system, most of the Windows registry is loaded into the RAM. Thus, the system has faster access to settings, and writing and reading operations are faster, compared to a .ini file.
Finally, backup and restore operations are easier with the use of the registry. We can also access the registry outside of the Windows installation, from the local network or with the use of a boot environment, such as BartPE and the Ultimate Boot CD for Windows.
How to access, backup, and edit the Windows registry
Microsoft has incorporated into Windows a program for opening and editing the Windows registry, with the inspired name "Registry Editor."
The method of accessing the Registry Editor is the same in all versions of Windows.
Firstly, we press the Windows + R button, to open the run window. There, we type:
On the left pane, we will find the Windows registry keys. They have the appearance and a hierarchy similar to the folders in Windows Explorer. On the right, the Registry Editor shows the contents of the selected key.
The five top keys, that we call "root keys," group the settings for separate system domains, which we will analyze below.
Attention! The Windows registry stores important settings for the system's operation. Therefore, we must be cautious about any changes that we are making.
Ideally, before we make any changes to any key, we should keep a backup of it, in case something goes wrong.
How do I back up the Windows registry
Specific applications, such as Ccleaner, can keep a full backup of the Windows registry. In most cases, however, it is enough to back up only the key we intend to change.
To back up a key, we right-click on the key and select "Export."
The export will produce a .reg file with a "Registration Entries" type, which we can name however we want.
If we want to restore the registry backup, it is enough to double-click on the file we created.
After we confirm the action, the file will restore the previous settings to that particular key, overwriting any changes.
Using third-party .reg files
On the internet, we can find countless ready-made .reg files to change any number of registry settings immediately.
These files, like the backups that we can create, contain the information for one or more registry keys in plain text. We can see their contents by right-clicking the file and choosing "Edit."
By default, this will open the notepad to show the file contents.
If we run this file, the system will incorporate all of its keys and settings into the Windows registry. It will add new keys, and change any pre-existing values.
As you can understand, it's imperative to run third-party reg files only if we completely trust their source. A malicious reg file, or even a poorly written one, can contain dangerous settings for our system.
The basic internal structure of the Windows registry
For a beginner, the Windows registry will probably seem chaotic. However, it has a well-structured logic.
The root keys
Opening the Registry Editor, the first thing we see is the five root keys, which contain all the Windows registry data.
- HKEY_CLASSES_ROOT (HKCR)
The first root key contains information about all the different file types the system recognizes, and which program opens which file type.
The information contained therein is a combination of data from the HKEY_LOCAL_MACHINE\Software\Classes keys, which includes the file associations created by application installers, and the HKEY_CURRENT_USER\Software\Classes keys, where we will find all the file associations we manually created.
- HKEY_CURRENT_USER (HKCU)
In this root key, we will find all the information about the user currently logged in to Windows.
It is linked to a subkey in HKEY_USERS that corresponds to that particular user. Both keys give access to the same information.
Since Windows Vista, each user's settings are also stored in the NTUSER.DAT and USCLASS.DAT file in their folder within C:\Users\
- HKEY_LOCAL_MACHINE (HLKM)
The local machine root key contains most of the operating system settings for the particular PC.
The main subcategories, which we will find in all versions of Windows, are "SAM," "SECURITY," "SYSTEM," and "SOFTWARE." The contents of these keys are stored as files in the C:\Windows\system32\config\ folder.
In SOFTWARE we will find all the settings for Windows and any installed programs that use the registry. We will find most of the applications subkeys organized by the software company's name.
SYSTEM contains information about the Windows installation, multiple different control sets for the device drivers, both active and backed up, and all the Windows services.
- HKEY_USERS (HKU)
This general root key contains subkeys that correspond to the HKEY_CURRENT_USER keys for each Windows user.
- HKEY_CURRENT_CONFIG (HKCC)
The contents of this key are not stored as files on the disk. The system creates them dynamically on each startup. It loads most of its contents from HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\
Each key may contain data of the following types:
|REG_SZ||Text data (String type)|
|REG_EXPAND_SZ||Disposable string value; can include variables|
|REG_BINARY||Binary data, any kind|
|REG_DWORD / REG_DWORD_LITTLE_ENDIAN||A 32-bit integer value without a sign, with a value between 0 and 4,294,967,295|
|REG_LINK||A symbolic link to another Windows registry key|
|REG_MULTI_SZ||A value with multiple String type data sets in a list.|
|REG_RESOURCE_LIST||A resource list, used by Plug-n-Play devices|
|REG_FULL_RESOURCE_DESCRIPTOR||A resource description (employed by the Plug-n-Play process)|
|REG_RESOURCE_REQUIREMENTS_LIST||A list of resource requirements (used by Plug-n-Play devices)|
|REG_QWORD / REG_QWORD_LITTLE_ENDIAN||A QWORD value, a 64-bit integer|
Should I use a registry cleaner?
The internet is chock full of ads for registry cleaner applications, designed to declutter/defrag/wash the Windows registry inside and out, with the promise of making our computer faster and more efficient.
As we already mentioned, most of the Windows registry is loaded into the RAM at each startup. So it sounds logical that if we use a registry cleaner to get rid of unnecessary keys and uninstalled application leftovers, it should be good for our computer.
However, the fact is that the Windows registry contains hundreds of thousands of keys. If a registry cleaner deletes 100, 200, or even 500 keys, it will not make the slightest difference in our system.
In fact, we have yet to see a definitive test which proves, beyond any doubt, that a registry cleaner will make a Windows installation even a bit faster.
On the contrary, we have personally witnessed severe problems created by the use of a registry cleaner. And we are talking about the registry cleaner incorporated in Ccleaner, not a no-name possibly scam registry cleaner app.
This kind of disaster won't happen in every system, but specific Windows installations can completely break down after an otherwise innocent registry clean. Just avoid any registry cleaner function on any app, and you won't miss out on anything.
Is it necessary to defragment the Windows registry?
A different registry cleaner flavor includes "registry defrag" applications. These programs, as the name would suggest, promise defragmentation of the Windows registry, again with the goal of speeding up our computer.
One of the best-known applications is the free Auslogics Registry Defrag.
The thing is, as we have already mentioned twice, most of the Windows registry is loaded into the RAM on every startup.
Fragmentation might become a problem in HDD drives, which have drive heads and spinning platters. When a file is fragmented, the drive will take longer to read it.
RAM, on the other hand, doesn't have a problem with fragmentation, it doesn't slow it down in any way. Also, even if files on the RAM were fragmented, on each reboot the RAM is cleared out, and the registry is reloaded. That would get rid of any fragmentation by itself.
Do you have any questions about the Windows registry or registry cleaners?
If you have something to add to the guide or need some clarification about the Windows registry, let us know in the comments below.
- How To Clean Windows Automatically, without CCleaner
- Backup Program Settings for Windows Format or Transfer
- Analyze Blue Screens on Windows with WhoCrashed
- Windows "GodMode" plus 70 Windows Settings Icons
- Uninstall Windows 10 and Revert to Previous Windows
Do you want to support PCsteps, so we can post high quality articles throughout the week?
If you prefer your purchases from China, we are affiliated with one of the largest international e-shops: