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
Here's what I did:
public static bool Isx86() { return (Environment.ExpandEnvironmentVariables("%ProgramFiles(x86)%").Length == 0); }
If you're on 64 bit architecture you'll have two program file env variables. If you're on x86, you'll only have the one.