Windows Registry
Cheat sheet · https://pcornel.dk/topic.php?topic=2935
Answer
The Windows Registry is a hierarchical database used by Windows, services and applications to store configuration and state. Data is organized into keys/subkeys and named values beneath root-key views such as HKEY_LOCAL_MACHINE (HKLM), HKEY_CURRENT_USER (HKCU) and HKEY_USERS (HKU).
Remember
- A key is a container/node; a value is a named data entry stored under a key.
- HKCU is a view of the currently loaded user profile hive under HKU.
- HKCR is a merged compatibility view related to class/file-association registration rather than an independent ordinary hive file.
- Registry values can be strings, expandable strings, integers, multi-strings or binary data.
- 32-bit and 64-bit processes can see different Registry views for redirected locations.
- Stored configuration does not prove a service/application has reread or accepted it.
First checks
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 permissions
Verify in this order
setting → hive → key → value (type and data) → read by Windows or the application
Where it usually breaks
First mismatch in target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence; preserve identity/native error/pre-state before mutation.
Registry root-key quick reference
| Root | Typical meaning | Important boundary |
|---|---|---|
| HKLM | machine-wide system/software configuration | applies by key semantics; not every process rereads live |
| HKCU | current user’s profile-backed configuration view | depends on the user context |
| HKU | loaded user profile hives | includes multiple user/security contexts |
| HKCR | merged class/association registration view | compatibility/merge semantics matter |
| HKCC | current hardware-profile view | not a generic machine configuration root |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2935