c# - Determining Windows OS architecture in a non locale-sensitive manner -
I'm looking for a trusted way to determine the Windows OS architecture (32-bit or 64-bit) in some way I'm using C # to do that which is not sensitive to the Windows version or the system locale / display language. To clarify, I need OS architecture, not processor architecture, and not application architecture.
I know that I can use IntPtr.Size, but it depends on the target architecture of the application.
I also get the "OSArchitecture" property from Win32_OperatingSystem to get the system. Have tried to use management. However, the value of this change based on the display language. (For example, if I set the display language in space then I get "64 bit", when in English it is "64-bit".)
Thanks!
Here's an answer
Actually, you can type it You can check before and then make the appropriate call to check the correct method
Comments
Post a Comment