二维码 短网址 cnBeta

批处理判断操作系统32位或64位,并注册服务

 1 @echo off
 2 if /i "%PROCESSOR_IDENTIFIER:~0,3%" == "x86" goto 1 /////通过参数判定操作系统位数,并跳转
 3 if /i "%PROCESSOR_IDENTIFIER:~0,3%" NEQ "x86" goto 2 ///此条语句后面可以改为 EQU "EM6"
 4 :1  /////32位注册服务
 5 @echo 32bit
 6 Regsvr32 %windir%\System32\***.dll
 7 exit
 8 
 9 :2  /////64位注册服务
10 @echo 64bit
11 Regsvr32 %windir%\SysWOW64\***.dll
12 exit

 

posted @ 2016-11-29 18:33  何苦而乐  阅读(1555)  评论(0编辑  收藏  举报
返回顶部