how to detect 64bit platform by script

前端 未结 2 1525
予麋鹿
予麋鹿 2020-12-13 14:54

is there code to detect 64 platform e.g.

if X86 then ...
if X64 then ...
2条回答
  •  庸人自扰
    2020-12-13 15:03

    Yes.

    Use

    if IsWin64 then
      // Do sth
    else
      // Do sth else
    

    There is also a Is64BitInstallMode function. Indeed, a 32-bit setup can run on a 64-bit OS. Hence, Is64BitInstallMode implies IsWin64, but IsWin64 does not imply Is64BitInstallMode.

提交回复
热议问题