Detect whether current Windows version is 32 bit or 64 bit

前端 未结 23 2360
抹茶落季
抹茶落季 2020-11-28 03:47

Believe it or not, my installer is so old that it doesn\'t have an option to detect the 64-bit version of Windows.

Is there a Windows DLL call or (even better) an en

23条回答
  •  有刺的猬
    2020-11-28 04:19

    I use this:

    @echo off
    if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
     echo 64 BIT
    ) else (
     echo 32 BIT
    )
    

    It works on Windows XP, tested it on Windows XP Professional Both 64 bit and 32 bit.

提交回复
热议问题