Detect whether current Windows version is 32 bit or 64 bit

前端 未结 23 2839
抹茶落季
抹茶落季 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:25

    See the batch script listed in How To Check If Computer Is Running A 32 Bit or 64 Bit Operating System. It also includes instructions for checking this from the Registry:

    You can use the following registry location to check if computer is running 32 or 64 bit of Windows operating system:

    HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0
    

    You will see the following registry entries in the right pane:

    Identifier     REG_SZ             x86 Family 6 Model 14 Stepping 12
    Platform ID    REG_DWORD          0x00000020(32)
    

    The above “x86” and “0x00000020(32)” indicate that the operating system version is 32 bit.

提交回复
热议问题