Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Registry

Direct answer

The Windows registry is a hierarchical database of system, application and user settings, organized in hives and keys under roots like HKLM and HKCU. Edit it with regedit, reg.exe or PowerShell, and back it up first.

When to use this

Use this when reading or changing Windows settings stored in the registry.

First 30 seconds

1. Identify the key path and value name (and type: REG_SZ, DWORD …).

2. Back up: reg export <key> backup.reg.

3. Read with Get-ItemProperty; check permissions with Get-Acl.

4. Change via GPO/tool if possible; otherwise Set-ItemProperty.

5. Confirm effect; restore from the .reg if wrong.

Operational verification

hive file loaded → root key → subkeys → values with type and data → consumer reads them

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Microsoft Windows
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformMicrosoft Windows · Windows / Windows Server / PowerShell
Key commandregedit
Scope / prerequisiteUse this when reading or changing Windows settings stored in the registry.
Reference · 2
What next?2 suggested next steps
Child topics (this level)9
Catalog command links2
Evidence0
On this pageJump to a specific section
Windows command reference

Primary Commands

Configuration and operational commands for this Topic.

Drill down

Subtopics

Go one level deeper into this subject.

Subtopic Registry Architecture

The registry architecture consists of root keys that map onto hive files on disk, containing nested keys with typed values.

Subtopic HKEY_LOCAL_MACHINE

HKEY_LOCAL_MACHINE (HKLM) holds machine-wide configuration: hardware, drivers, services, installed software and security settings, stored in the SYSTEM, SOFTWARE, SAM and SECURITY hives.

Subtopic HKEY_CURRENT_USER

HKEY_CURRENT_USER (HKCU) holds the logged-on user's settings, such as desktop, environment variables and application preferences.

Subtopic HKEY_CLASSES_ROOT

HKEY_CLASSES_ROOT (HKCR) holds file associations and COM class registrations.

Subtopic HKEY_USERS

HKEY_USERS (HKU) contains the loaded profiles of all users on the machine, keyed by SID, plus .DEFAULT for the system account.

Subtopic Registry Hives

Registry hives are the files that store registry data: SYSTEM, SOFTWARE, SAM, SECURITY and DEFAULT in C:\Windows\System32\config, plus NTUSER.DAT and UsrClass.dat in each user profile.

Subtopic Registry Keys

Registry keys are containers in the registry tree, like folders, addressed by paths such as HKLM\SYSTEM\CurrentControlSet\Services.

Subtopic Registry Values

Registry values are named data entries inside keys, with types such as REG_SZ (string), REG_DWORD (32-bit number), REG_MULTI_SZ, REG_EXPAND_SZ and REG_BINARY.

Subtopic Registry Troubleshooting

Troubleshoot the registry by exporting keys before changes (reg export), checking permissions on keys, using Process Monitor to see which keys an app reads, and restoring hives from backup or RegBack if Windows cannot start.

Key points
  • Export the key with reg export before you change anything.
  • HKCU is per user, HKLM is machine-wide.
  • A Group Policy value overwrites your manual change at next refresh.
Key checks
  • Get-ItemProperty 'HKLM:\<path>' — read values
  • reg query <key> /s — query in CMD
  • reg export <key> <file>.reg — back up a key
  • Get-Acl 'HKLM:\<path>' | fl — key permissions
  • Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Services' — example: services keys
ReferenceImportant terms & boundaries2 sections · depth on demand

Root keys

KeyContains
HKLMMachine-wide settings
HKCUCurrent user (from HKU\SID)
HKCRFile associations/COM (merged view)
HKUAll loaded user profiles
HKCCCurrent hardware profile

In depth

The registry is Windows' hierarchical configuration database: keys (like folders) contain values (name, type, data). Root keys are views onto hive files loaded from disk.

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' | Select ProductName,DisplayVersion,CurrentBuild
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
reg export HKCU\Software\MyApp myapp-backup.reg

Change settings through Group Policy, Intune or documented tools where possible; direct registry edits are hard to track and easy to get wrong.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Lifecycle

Registry/policy updates, service configuration, package/update installation, AD/DNS/DHCP changes, firewall rules, certificates, storage mappings and cluster/Hyper-V operations may require propagation or restart before they become effective.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docMicrosoft Windows current

Authoritative/upstream documentation reviewed for bounded claims in Registry. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry · confidence 94%
Confirmation

Confirm action

Continue?