Use this to understand how the registry is structured.
Registry Architecture
The registry architecture consists of root keys that map onto hive files on disk, containing nested keys with typed values. The kernel's configuration manager loads hives at boot and logon.
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.
hive file loaded → root key → subkeys → values with type and data → consumer reads them
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Editing without a backup (
reg export). - Confusing 32-bit and 64-bit views (
WOW6432Node).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Root keys map onto hive files on disk.
- Keys hold subkeys and typed values.
- Each key has its own permissions.
Get-ItemProperty 'HKLM:\<path>'— read valuesreg query <key> /s— query in CMDreg export <key> <file>.reg— back up a keyGet-Acl 'HKLM:\<path>' | fl— key permissionsGet-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Services'— example: services keys
ReferenceWhy it matters1 section · depth on demand
How it works
The registry is a hierarchical database. Keys (like folders) hold values (name, type, data). It is stored in several hive files that are loaded at boot (machine hives) or at logon (user hives). The root keys you see in regedit are views onto those hives; for example HKCU is the logged-on user's hive under HKU\<SID>. Applications and Group Policy write settings here; the kernel reads SYSTEM early in boot.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Hives and their supporting files
Microsoft documents a hive as a group of keys backed by files loaded at startup or logon, mostly under %SystemRoot%\System32\Config:
| Hive | Supporting files |
|---|---|
| HKLM\SYSTEM (also HKCC) | System, System.alt, System.log, System.sav |
| HKLM\SOFTWARE | Software, Software.log, Software.sav |
| HKLM\SAM | Sam, Sam.log, Sam.sav |
| HKLM\SECURITY | Security, Security.log, Security.sav |
| HKU\.DEFAULT | Default, Default.log, Default.sav |
| HKCU | %USERPROFILE%\Ntuser.dat, Ntuser.dat.log |
.log files are transaction logs that let Windows recover a hive after an interrupted write.
Root keys are views, not separate stores
| Root key | Really is |
|---|---|
| HKEY_CURRENT_USER | HKEY_USERS\<SID of current user> |
| HKEY_CLASSES_ROOT | Merge of HKLM\SOFTWARE\Classes and HKCU\Software\Classes |
| HKEY_CURRENT_CONFIG | HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current |
Editing another user's or an offline hive
reg load HKLM\TempUser C:\Users\alice\NTUSER.DAT
reg query HKLM\TempUser\Software\Microsoft\Windows\CurrentVersion\Run
reg unload HKLM\TempUser
Always unload — a loaded hive is locked and the user's next logon fails or gets a temporary profile. The same works from WinRE against C:\Windows\System32\config\SOFTWARE for an unbootable system.
32-bit and 64-bit views
64-bit Windows redirects 32-bit processes from HKLM\SOFTWARE to HKLM\SOFTWARE\WOW6432Node. A setting "missing" for a 32-bit application often exists only in the other view:
reg query HKLM\SOFTWARE\Vendor /reg:32
reg query HKLM\SOFTWARE\Vendor /reg:64
Value types
| Type | Typical content |
|---|---|
| REG_SZ / REG_EXPAND_SZ | Text; EXPAND resolves %SystemRoot% when read |
| REG_DWORD / REG_QWORD | 32/64-bit numbers (flags, timeouts) |
| REG_MULTI_SZ | List of strings |
| REG_BINARY | Raw data |
Writing a DWORD as REG_SZ is a frequent cause of "the setting does nothing".
Hive files
| Hive | File |
|---|---|
| HKLM\SYSTEM | C:\Windows\System32\config\SYSTEM |
| HKLM\SOFTWARE | ...\config\SOFTWARE |
| HKLM\SAM / SECURITY | ...\config\SAM, SECURITY |
| HKCU | C:\Users\<user>\NTUSER.DAT |
| HKCU\Software\Classes | ...\AppData\Local\Microsoft\Windows\UsrClass.dat |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Registry → Registry Architecture. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry · confidence 94%