首页 > 其他 > 详细

cmd查看电脑是32位还是64位

时间:2017-04-05 23:47:11      阅读:462      评论:0      收藏:0      [点我收藏+]

代码如下

@echo off

if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
   echo OS is 64bit
) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
   echo OS is 64bit
) ELSE (
   echo OS is 32bit
)

pause

 知识点:

The general idea is to check the following environment variables:

  • PROCESSOR_ARCHITECTURE – reports the native processor architecture EXCEPT for WOW64, where it reports x86.
  • PROCESSOR_ARCHITEW6432 – not used EXCEPT for WOW64, where it reports the original native processor architecture.
Environment Variable \ Program Bitness 32bit Native 64bit Native WOW64
PROCESSOR_ARCHITECTURE x86 AMD64 x86
PROCESSOR_ARCHITEW6432 undefined undefined AMD64

cmd查看电脑是32位还是64位

原文:http://www.cnblogs.com/libra13179/p/6670946.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!