方法一:
systeminfo |find "x64"
方法二:
有时候需考虑wow的情况
IF PROCESSOR_ARCHITECTURE == amd64 or PROCESSOR_ARCHITEW6432 == amd64 THEN // OS is 64bit ELSE // OS is 32bit END IF Another way to test for the same thing is: IF PROCESSOR_ARCHITECTURE == x86 AND PROCESSOR_ARCHITEW6432 NOT DEFINED THEN // OS is 32bit ELSE // OS is 64bit END IF