You are here

How to check if windows system is 32 or 64 bit in batch/cmd file

echo "System is 32 bit"
) else (
echo "System is 64 bit"

There are some other solutions, too, but this seems to be the most efficient. This way only works, if you are using the 64 bit cmd.exe:

Microsoft has a solution, too, but it required to create a temp-file:

Also interesting is maybe this article:

if not "%ProgramFiles(x86)%" == "" (
set ProgRoot=%ProgramFiles(x86)%
echo %ProgRoot%

outputs: C:\Program Files (x86