Batch to detect if system is a 32-bit or 64-bit

后端 未结 9 1422
心在旅途
心在旅途 2021-02-12 22:45

Does anybody know how to create a batch file that can shell one program if its a 64-bit system or shell another if its a 32-bit system?

9条回答
  •  遇见更好的自我
    2021-02-12 22:51

    All batch up there not work in my Windows 8 x64.

    Following work with me :

    @cd %programfiles(x86)%\
    
    @if %ERRORLEVEL% == 0 (echo x64&&pause)
    
    @if %ERRORLEVEL% == 1 (echo x86&&pause)
    

提交回复
热议问题