Wednesday, November 5, 2008

Detecting if the processor is 64 bit in a batch file

I needed a batch file to copy a different DLL depending on the processor architecture (one for x86 and one for x64).

Using the environment variables PROCESSOR_ARCHITECTURE did the trick.

echo %PROCESSOR_ARCHITECTURE%