I want to check which CPU architecture is the user running, is it i386 or X64 or AMD64. I want to do it in C#. I know i can try WMI or Registry. Is there any other way apart
I know that this question is from the past, but as of 2017, there is now a simple method to know the architecture of the current process, in .net standard :
System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture
The value returned is one of X86, X64, ARM, ARM64 and gives the architecture of the process it's running in. OSArchitecture
returns the architecture of the installed operating system instead.
Links to the docs (pretty useless though...):
RuntimeInformation.ProcessArchitecture: https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeinformation.processarchitecture?view=netstandard-1.4
Architecture enumeration: https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=netstandard-1.4