Use this when locating or recovering registry hive files.
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.
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
- Copying hive files from a running system (they are locked — use VSS or offline).
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.
- System hives live in C:\Windows\System32\config.
- User hives are NTUSER.DAT and UsrClass.dat.
- RegBack copies may be empty on newer Windows.
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
What it is
A hive is a file-backed section of the registry. Machine hives (SYSTEM, SOFTWARE, SAM, SECURITY, DEFAULT) live in C:\Windows\System32\config; each user's hive is NTUSER.DAT in their profile. Hive files are locked while loaded and protected by transaction logs (.LOG1, .LOG2) so a crash does not corrupt them. A damaged SYSTEM hive stops boot; a damaged NTUSER.DAT gives a temporary profile.
ReferenceImportant terms & boundaries2 sections · depth on demand
Backup and repair
reg export HKLM\SOFTWARE\Vendor backup.regbefore edits.- System Restore and backups include hives.
- Windows no longer keeps
RegBackcopies by default (since 1803) — rely on restore points/backups.
In depth
Hives are the files backing registry keys:
| Hive file | Mounted at |
|---|---|
System32\config\SYSTEM, SOFTWARE, SAM, SECURITY, DEFAULT | HKLM\…, HKU\.DEFAULT |
C:\Users\<u>\NTUSER.DAT | HKU\<SID> |
C:\Users\<u>\AppData\Local\Microsoft\Windows\UsrClass.dat | HKU\<SID>_Classes |
C:\Windows\AppCompat\Programs\Amcache.hve | Forensic program execution data |
Each hive has transaction logs (.LOG1, .LOG2). Windows no longer creates periodic RegBack copies by default (since 1803); system state backup or restore points cover registry recovery.
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 Hives. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry · confidence 94%