All You Need to Know About Windows Registry (What It Is and How to Use It)
Windows Registry is one of the mysterious parts of the Windows operating system that allows us to tweak and modify almost all the sections of Windows. Even though we work with the registry all the time, most people have only a little understanding of what it really is and are not sure of how to create custom keys and values. So let’s find out a thing or two about Windows Registry and its components.
What is Windows Registry?
Windows Registry is nothing but a collection of different configurations and settings related to the operating system, programs, and users. You can think of it like a database that virtually stores all the important information. This information includes anything related to system hardware, application settings, installed programs, user profiles, etc. Since all the important information is stored in a single place, Windows refers to the Registry all the time, and it is actually easier and faster for Windows to manage different parts of the operating system without messing with tons of individual configuration files located in different locations.
Components of Windows Registry
There are five different Root level keys which have their own specific purpose in the registry. Here is a list of these root keys.
HKEY_CLASSES_ROOT (HKCR): This Root key is used by Windows to manage Object Linking and Embedding (OLE) and file type associations. This is the key where Windows links all your files to their relevant programs so that you can open and interact with them.
HKEY_CURRENT_USER(HKCU): This section of Windows Registry hosts all the data, user-level settings and configurations associated with the currently logged in user. Not only the Windows operating system, but other programs also store data relevant to the current user.
HKEY_LOCAL_MACHINE (HKLM): Regardless of the user status, this section contains all the system related keys including any hardware settings, software settings, etc. Since this key hosts most of the system-wide information, HKLM is one of the most accessed root keys of Windows Registry.
HKEY_USERS (HKU): As you can see from the name, this root key hosts all the settings of all the users including any logged in and logged off users on the system. As you can find settings regarding other users, don’t confuse this root key with HKCU.
HKEY_CURRENT_CONFIG (HKCC): Simply put, you can call this a pseudo root key as it is just a direct link to the Current Hardware Profile Settings in the HKLM root key.
Windows Registry – Key Values
Every Root Keys has their own Keys, and each Key has its own values. For each Key, you can create six different values, and those values depend entirely upon the target program and/or the configuration requirements.
String Value: String Values are mostly human readable and only have a single line of textual information, like file paths. String Values are one of the most commonly used values in the Windows Registry.
Binary Value: As the name implies, these values only contain binary data (0, 1). Often these values are used to turn on or off a particular setting.
DWORD Value (32-bit): DWORD values are similar to Binary values but are also capable of storing any integer in the range of 32-bit. DWORD values are designed to work with 32-bit systems, but are also used in 64-bit systems for backward compatibility.
QWORD Value (64-bit): QWORD values are just like DWORD values but are capable of holding any integer within the range of 64-bits. You can say these are designed to work with 64-bit systems.
Multi-String Value: If String values are used to store single line strings, Multi-String values are used to store multi-line strings or textual information.
Expandable String Value: Expandable String values are similar to normal String values but contain the environmental variables.
Creating New Keys and Values
Creating Keys and Values in Windows Registry is relatively easy, But before doing anything, need to take backup so avoid mis-configurations or unwanted deletions may cause critical errors.
To create a new Key or new value, right-click on the Root level key and select the option “New” and then “Key.” By default, the newly created key will look like a folder and will be named something like “New Key #.” You can always modify the key name as required. The same procedure is applied whenever you want to create a new Sub-Key.
How to Backup Registry in Windows?
As we know that it is important to backup all our data in the computer, but do you know that it is important to backup your Windows registry as well? The registry is the database that contains all the configuration options and settings for the Windows OS. When a virus struck, this is often the first place that it infects.
To backup the Registry on a Windows system, follow these steps:
- Click Start
regeditin the search box
- Click the regedit item appearing in the list or
Press Windows key + R
- Click Continue, if you’re prompted by User Account Control
- Select Computer from the left side. Make sure it’s selected.
- Go to File and then Export
- At the Export Registry File, type a name for the backup file
- Choose All under the Export range section
- Select a location where you want to save the backup file
- Click Save
The backup files are saved with this extension:
How to restore a previously created backup file of the Registry in Windows?
To restore a previously created backup file of the Registry in Windows, follow these instructions:
- Open the Registry Editor: type
regeditat the search box and click on the regedit item when it appears in the search results list
- At File, click Import
- At the Import Registry File screen, browse and select the backup .reg file to be restored from your Desktop or from where you saved it
- Click Open
- Once completed, restart the computer to login back on your Windows computer
That’s all about Windows Registry, Do comment below sharing your thoughts and experiences.