Use this when file associations or COM registrations are wrong.
HKEY_CLASSES_ROOT
HKEY_CLASSES_ROOT (HKCR) holds file associations and COM class registrations. It is a merged view of HKLM\Software\Classes and HKCU\Software\Classes, with user settings taking priority.
1. Is the setting per machine or per user? (HKCR holds file associations and COM registration (merged from HKLM and HKCU Classes).)
2. Back up the key before changing it.
3. Read the value with Get-ItemProperty / reg query.
4. For another user: load or use HKU\<SID>.
5. Verify the program sees the change.
HKCR root key → subkeys → values → read by Windows and applications
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 to HKCR directly and affecting all users.
Step 2 Where it fails Narrow the fault
Failure analysis for Registry → HKEY_CLASSES_ROOT follows the Windows chain of components: target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence.
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.
- HKCR merges HKLM\Software\Classes and HKCU\Software\Classes.
- User entries override machine entries.
- Export before changes.
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 permissionsreg query HKCR— top-level keys
ReferenceWhy it matters1 section · depth on demand
How it is built
HKCR is a merged view of HKLM\SOFTWARE\Classes (machine) and HKCU\Software\Classes (user, wins on conflict). Write file associations to the specific location, not HKCR, to control scope. Modern Windows protects default app choices with a hash (UserChoice), so scripts cannot simply set them.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
HKEY_CLASSES_ROOT (HKCR) is a merged view of HKLM\SOFTWARE\Classes and HKCU\Software\Classes: file associations, COM registrations, shell handlers. Per-user entries win over machine entries.
Get-ItemProperty 'Registry::HKEY_CLASSES_ROOT\.pdf'
cmd /c assoc .txt; cmd /c ftype txtfile
Windows 10/11 protect default app choices with a hash (UserChoice), so changing associations by editing the registry alone no longer works — use DISM default app association XML via GPO.
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 → HKEY_CLASSES_ROOT. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry · confidence 94%