如何通过脚本检测64位平台
问题描述:
是否存在用于检测64个平台的代码,例如
is there code to detect 64 platform e.g.
if X86 then ...
if X64 then ...
答
是.
使用
if IsWin64 then
// Do sth
else
// Do sth else
还有一个Is64BitInstallMode
功能.实际上,32位设置可以在64位OS上运行.因此,Is64BitInstallMode
表示IsWin64
,但IsWin64
并不表示Is64BitInstallMode
.
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
.