Reading the registry and Wow6432Node key
问题 I have some code that reads the registry and looks for a value in HKEY_LOCAL_MACHINE\Software\App\ but when running on 64-bit versions of Windows the value is under HKEY_LOCAL_MACHINE\Software\Wow6432Node\App\ . How should I best approach this? Do I need a 64-bit installer or should I rewrite my code to detect both places? 回答1: If you mark you C# program as x86 (and not Any CPU) then it will see HKEY_LOCAL_MACHINE\Software\Wow6432Node\App as HKEY_LOCAL_MACHINE\Software\App\ . A .NET program