Use this when setting registry values with the right type.
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. Set them with reg add or Set-ItemProperty.
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
- Writing a number as REG_SZ, which the application ignores.
- Hex vs decimal confusion in
reg add /d.
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.
- Value type matters: REG_SZ, REG_DWORD, REG_EXPAND_SZ, REG_MULTI_SZ.
- REG_EXPAND_SZ expands %variables%.
- DWORD data can be entered as hex or decimal.
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 value is a named piece of data inside a key; each key also has an unnamed (Default) value. The application decides which type it expects, so the same number written as a string may be ignored. Read one value with Get-ItemPropertyValue HKLM:\SOFTWARE\Vendor\App -Name Enabled.
ReferenceHow it works1 section · depth on demand
In depth
Registry value types:
| Type | Content | Example |
|---|---|---|
| REG_SZ | String | Paths, names |
| REG_EXPAND_SZ | String with %variables% | %SystemRoot%\system32 |
| REG_MULTI_SZ | List of strings | Dependencies |
| REG_DWORD | 32-bit number | Flags (0/1) |
| REG_QWORD | 64-bit number | Large values |
| REG_BINARY | Raw bytes | Hardware data |
New-ItemProperty -Path HKLM:\SOFTWARE\CorpApp -Name Enabled -PropertyType DWord -Value 1 -Force
reg add HKLM\SOFTWARE\CorpApp /v LogPath /t REG_EXPAND_SZ /d "%ProgramData%\CorpApp\logs" /f
Wrong type is a classic bug: many settings are ignored if written as REG_SZ instead of REG_DWORD.
ReferenceImportant terms & boundaries1 section · depth on demand
Value types
| Type | Content |
|---|---|
| REG_SZ | String |
| REG_EXPAND_SZ | String with %VAR% expansion |
| REG_MULTI_SZ | List of strings |
| REG_DWORD | 32-bit number |
| REG_QWORD | 64-bit number |
| REG_BINARY | Raw bytes |
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 Values. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry · confidence 94%