Hey all,
I'm looking for a reliable way to determine the Windows OS architecture (32-bit or 64-bit) in a manner that isn't sensitive to Windows version or the system locale/display language. I will be using C# to do this. To clarify, I need the OS architecture, not the processor architecture, and not the application architecture.
I know I can use IntPtr.Size, but this is dependent on the application's target architecture.
I've also tried using System.Management.ManagementClass to get the "OSArchitecture" property from Win32_OperatingSystem. However, the value of this changes depending on the display language. (For example, if I set the display language to Spanish I get "64 bits", when in English it is "64-bit".)
Thanks!