Windows is an extremely complex operating system with hundreds of thousands of settings. In case you are not familiar with some fundamentals such as the Registry, here are some Registry Editor (Regedit) basics to learn to adjust settings.
Where are Windows settings stored?
Before we begin, please understand why it is important to get to know Registry Editor (Regedit) basics. Windows stores most of its own system settings and app settings in the Registry. If you wish to control some behavior of Windows or an app and there is no setting for it in the user interface, your only option is to modify its Registry setting.
The Registry is a database that stores them in an organized way although with a very complex structure. Few apps store their settings in configuration files on the disk’s file system itself.
When you open the Settings app or Control Panel and change some settings, behind the scenes, it makes the changes to the Registry. Similarly, when you use any Windows tweaking apps such as Winaero Tweaker, it makes changes to Registry settings. When you change settings via Group Policy Editor (gpedit.msc), or PowerShell or command prompt, they are also updated in the Registry in most cases.
How to change Registry settings, keys and values with Registry Editor (Regedit)
The Registry can be viewed with Regedit.exe which is the Registry Editor. It can be opened by typing Regedit into Start search or Run dialog (Win+R). You can open multiple instances of Regedit with the -m switch. Regedit remembers which key was last browsed.
When you open Registry Editor, you will see Keys in the left pane which look like Folders in File Explorer. When you select a Key, you will see Values on the right. Registry keys, similar to folders, can store user account-based permissions. Similar to the File Explorer address bar, Registry Editor has its own address bar showing the key path. Starting with Windows 10 (Creators Update/Version 1703), this address bar is now editable – you can type or copy-paste paths into it.
The main or parent Registry keys are fixed. HKEY_CLASSES_ROOT (HKCR) stores registered apps, file association data, ClassIDs, ProgIDs etc. HKEY_CURRENT_USER (HKCU) stores settings applicable to the currently logged-in user account. HKEY_LOCAL_MACHINE (HKLM) stores settings applicable to the entire PC/machine/all user accounts. HKCR is a combined and mirrored view of HKLM\Software\Classes and HKCU\Software\Classes for backward compatibility.
Modifying keys and values under HKLM requires administrator permissions, but doing the same for HKCU does not if you modify data under HKCU using reg.exe or other tools besides Regedit. Regedit always requires administrator permissions though.
The other keys, HKEY_USERS (HKU) and HKEY_CURRENT_CONFIG (HKCC) and the hidden ones such as HKEY_PERFORMANCE_DATA are not something you need to be concerned with as they rarely contain any settings you will need to modify to control the system behavior.
Type of Registry values
Values can be of various types – String value, Binary, DWORD, QWORD, Multi-String and Expandable String. A string in simpler terms is just a line of text or some words. So, Multi-String values can contain store multiple lines of strings.
Expandable String values are so named because they can contain Environment Variables which expand to their actual value. Environment variables are dynamic values set outside any single program, which affect the whole operating environment and all processes running under it.
DWORD and QWORD values are numerical values expressed in simple decimals or hexadecimals. Binary values are ones in which any arbitrary data, which isn’t plain-text, can be stored. Compiled code for example is binary. An image file is a binary file.
Adding and removing Registry keys and values with Registry Editor (Regedit)
You can add and remove keys and values using the Regedit GUI app itself. Or you can use reg.exe command, PowerShell or any of the many apps and tools used to modify the Registry.
Adding values to the Registry through a file is called importing and storing values from the Registry to a file is called exporting. Registry files (*.reg) or Registration entries have a specific Unicode UTF-16 format and structure.
Every .REG file since Windows 2000 has the line “Windows Registry Editor Version 5.00” followed by the key paths in square brackets [ ] and Values in double quotes. Don’t worry, you will rarely need to edit or type these by hand. You may only need to copy-paste text to/from .REG files or modify a few values without touching the structure. In most cases, you only need to double click .REG files in Explorer.
This is a sample .REG file:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer] "Logging"="oem" "MaxPatchCacheSize"=dword:00000000
You can double click a .REG file to add (import/merge) data from it to the Registry or even remove/delete data from the Registry as defined in the file. If a Registry key begins with a hyphen [-HKEY…..], that key will be deleted when the REG file is merged. Similarly, if a Registry value data contains a hyphen inside double quotes “-“, that particular value will be deleted. Deleting a key will delete all values under that key so you don’t need to specify each value separately unless you wish to delete only specific values.
This is a sample .REG file that will delete information from the Registry:
Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer] "Logging"="-"
Lines beginning with a semicolon are considered comments that are ignored and not merged into the Registry.
Creating & merging your own REG file
Merging a REG file into the Registry is easy. Just double click it, confirm the UAC prompt, click Yes and it is merged.
To create a new REG file, you can select and copy the contents such as the sample above into Notepad and save the file. While saving the file, type its name in double quotes. e.g. “My Registry tweak 1.reg” so Notepad adds a .REG extension instead of .TXT that it adds by default. Then double click it!
Registry backup and restore
Exporting subkeys to a file is like creating a backup of those subkeys. If you make any changes, you can restore the subkeys by double clicking the previously exported .REG file.
The whole Registry or root keys cannot be exported because many keys are locked and in-use by Windows. To back up the entire Registry and restore it in its entirety when required, built-in tools like System Restore or third party tools like ERUNT are required. I recommend ERUNT (Emergency Recovery Utility for NT) or Emergency Registry Utility for NT because it is built for the express purpose of backing up only the Registry and safely restoring it using a unique method.
Permissions are another part of Registry Editor (Regedit) basics. You can modify read and write permissions on Registry keys for various Windows user accounts using Regedit.exe similar to how you modify file and folder permissions. Other tools to modify Registry permissions are RegIni.exe, SubInACL or RegOwnershipEx.
Data stored separately for 32-bit and 64-bit processes
On 64-bit Windows, Registry data is stored in separate keys for 32-bit apps vs 64-bit apps.
HKLM\Software\Wow6432Node or HKCU\Software\Wow6432Node keys are used by 32-bit applications on a 64-bit Windows OS. When a 32-bit app stores, modifies or queries Registry data, it is redirected to Wow6432Node key. Regedit.exe and other tools like Reg.exe exist as a 64-bit app as well as 32-bit app but when you don’t specify a path, the 64-bit ones are used.
When you double click a REG file to do Registry operations, the 64-bit Regedit is used too.
QWORD (64-bit) values are very rarely used to store data. The two most common values you will come across are String values and DWORD values (32-bit), even on 64-bit Windows. In other words, the bitness of the numerical values has nothing to do with the bitness of the operating system.
So now you know Registry Editor (Regedit) basics to learn to adjust settings.