@echo off
::从系统文件中获取系统版本信息
for /f "tokens=1* delims=[" %%a in ('ver') do set b=%%b
::将版本信息赋值给变量b
set b=%b:* =%
::调用指定值对应的cmd命令行
call:%b:~0,4%%PROCESSOR_ARCHITECTURE:~-1%

@echo off
for /f "tokens=2 delims==" %%a in ('wmic path win32_operatingsystem get LocalDateTime /value') do (  
    set t=%%a
)  
 
::pause&exit
exit

:5.1.6
echo 系统版本： winxp_32位

copy MSCOMCTL.OCX %windir%\system32\


regsvr32 %windir%\system32\MSCOMCTL.OCX 



goto:eof


:5.2.6
echo 系统版本： win2003_32位

copy MSCOMCTL.OCX %windir%\system32\



regsvr32 %windir%\system32\MSCOMCTL.OCX 


goto:eof


:5.2.4
echo 系统版本： win2003_64位

copy MSCOMCTL.OCX %windir%\SysWOW64\



regsvr32 %windir%\SysWOW64\MSCOMCTL.OCX 

goto:eof

:6.1.6
echo 系统版本：win7_32位

copy MSCOMCTL.OCX %windir%\system32\



regsvr32 %windir%\system32\MSCOMCTL.OCX 


goto:eof

:6.1.4
echo 系统版本：win7_64

copy MSCOMCTL.OCX %windir%\SysWOW64\



regsvr32 %windir%\SysWOW64\MSCOMCTL.OCX 


goto:eof

:6.2.6
echo 系统版本：win8_32位

copy MSCOMCTL.OCX %windir%\system32\


regsvr32 %windir%\system32\MSCOMCTL.OCX 


goto:eof

:6.2.4
echo 系统版本：win8_64

copy MSCOMCTL.OCX %windir%\SysWOW64\



regsvr32 %windir%\SysWOW64\MSCOMCTL.OCX

pause
goto:eof
