Search code examples
c#javavbscriptprocessor

How can I programmatically determine my processor type?


How can I determine programmatically whether my machine is an x86, x64 or an IA64?


Solution

  • On Windows Systems you can get the environment variable PROCESSOR_ARCHITECTURE. Here is an MSDN article explaining the values that can be returned.

    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_ARCHITECTURE=IA64
    PROCESSOR_ARCHITECTURE=x86