Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Registry Hives

Direct answer

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.

When to use this

Use this when locating or recovering registry hive files.

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
Scope / prerequisiteUse this when locating or recovering registry hive files.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • System hives live in C:\Windows\System32\config.
  • User hives are NTUSER.DAT and UsrClass.dat.
  • RegBack copies may be empty on newer Windows.
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
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.reg before edits.
  • System Restore and backups include hives.
  • Windows no longer keeps RegBack copies by default (since 1803) — rely on restore points/backups.

In depth

Hives are the files backing registry keys:

Hive fileMounted at
System32\config\SYSTEM, SOFTWARE, SAM, SECURITY, DEFAULTHKLM\…, HKU\.DEFAULT
C:\Users\<u>\NTUSER.DATHKU\<SID>
C:\Users\<u>\AppData\Local\Microsoft\Windows\UsrClass.datHKU\<SID>_Classes
C:\Windows\AppCompat\Programs\Amcache.hveForensic 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 → 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%
Confirmation

Confirm action

Continue?