EMZETT.
Login

Windows registry: The central configuration database

In short: A hierarchical database in which Windows and many programs store their settings.

In more detail: The registry replaced the many individual INI files from Windows 95 onwards. It is a tree of keys (like folders) and values (like files with name, type and content). The Registry Editor regedit displays it.

In Depth

Structure

The top level is formed by the hives:

  • HKEY_LOCAL_MACHINE (HKLM): settings for the whole computer.
  • HKEY_CURRENT_USER (HKCU): settings of the signed-in user.
  • HKEY_CLASSES_ROOT: mapping of file types to programs.
  • HKEY_USERS and HKEY_CURRENT_CONFIG. Values have types such as REG_SZ (text), REG_DWORD (32-bit number), REG_BINARY and REG_MULTI_SZ. The data lives in files such as NTUSER.DAT and under C:\Windows\System32\config.

Examples of changes

Programs start automatically via HKCU\Software\Microsoft\Windows\CurrentVersion\Run. With PowerShell the registry can be read like a drive:

Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run'
Set-ItemProperty -Path 'HKCU:\Software\Example' -Name 'Value' -Value 1

Changes can also be passed on as a .reg file; a double-click enters them.

Caution

Wrong changes can make programs or Windows unusable. Before a change, export the affected key (File, Export) or create a restore point. So-called “registry cleaners” bring practically no benefit and often do harm. Malware uses autostart keys to settle in, so they are also a place for checks.

Today

Many settings can be made without the registry through the Settings app or group policies, which in the background also often write registry values. Universal Windows apps mostly store their data in their own folders. On Linux configuration files (/etc, ~/.config) and on macOS plist files correspond to this task.

See also: PowerShell, Windows 11, Windows