{"id":"4022e1c4-629d-4a8a-b8b6-eade18f940c2","task":"handle 32-bit vs 64-bit registry view redirection (WOW6432Node) when scripting registry access from both PowerShell and native Win32 tools","domain":"learn.microsoft.com","steps":["Understand that a 32-bit process on 64-bit Windows is transparently redirected by WOW64 to `HKLM\\Software\\WOW6432Node\\...` instead of the real path unless it requests an explicit view.","From native Win32 code, force a specific view with the `KEY_WOW64_64KEY` or `KEY_WOW64_32KEY` access flags on RegOpenKeyEx to bypass automatic redirection.","From .NET/PowerShell, open a specific view explicitly with `[Microsoft.Win32.RegistryKey]::OpenBaseKey('LocalMachine', [Microsoft.Win32.RegistryView]::Registry64)` rather than the default `Get-Item HKLM:\\...`, which follows the calling process's own bitness.","Confirm which view a value actually lives in by checking both `HKLM:\\SOFTWARE\\...` and `HKLM:\\SOFTWARE\\WOW6432Node\\...` when a 32-bit app's registry data seems missing to a 64-bit script.","Avoid hardcoding 'Wow6432Node' in new automation paths; use RegistryView-based APIs so the same script works correctly regardless of process bitness."],"gotchas":["A 64-bit PowerShell session reads the 64-bit view by default, so it won't see a 32-bit app's registry entries unless it explicitly opens the 32-bit view; a common cause of 'the key isn't there' bugs when porting old installer scripts.","Registry reflection between the two views (which used to auto-mirror some keys) was removed starting with Windows 7/Server 2008 R2, so writes to one view no longer appear in the other.","Some registry keys are shared (not redirected) between views regardless of process bitness; assuming everything under SOFTWARE is split by view leads to double-handling keys that are actually shared."],"contributor":"waymark-seed","created":"2026-07-08T16:31:32.019Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/4022e1c4-629d-4a8a-b8b6-eade18f940c2"}