zhz3721 当前离线
列兵
@echo off cls ::定义bat外观 title 『自动复制ocx控件文件到系统并注册』 MODE con: COLS=80 LINES=25 color 5E echo ___________________________________________________________________________ echo. echo 请稍等,正在复制所需的控件到系统并注册中........... echo ___________________________________________________________________________ %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d %~dp0 ver | find "4.0" > NUL && goto win95 ver | find "4.1" > NUL && goto win98 ver | find "4.9" > NUL && goto winMe ver | find "5.0" > NUL && goto win2000 ver | find "5.1" > NUL && goto winxp ver | find "5.2" > NUL && goto win2003 ver | find "6.0" > NUL && goto win2008 ver | find "6.1" > NUL && goto win7 ver | find "6.2" > NUL && goto win8 ver | find "6.3" > NUL && goto win8.1 ver | find "10.0" > NUL && goto win10 :win95 @echo 当前系统是:Windows 95 @echo ---------------------------------------- goto winxp_dn :win98 @echo 当前系统是:Windows 98 @echo ---------------------------------------- goto winxp_dn :winMe @echo 当前系统是:Windows Me @echo ---------------------------------------- goto winxp_dn :win2000 @echo 当前系统是:Windows 2000 @echo ---------------------------------------- goto winxp_dn :winxp @echo 当前系统是:Windows XP @echo ---------------------------------------- goto winxp_dn :win2003 @echo 当前系统是:Windows Server 2003 @echo ---------------------------------------- goto winxp_dn :win2008 @echo 当前系统是:Windows Vista @echo ---------------------------------------- goto winxp_up :win7 @echo 当前系统是:Windows 7 @echo ---------------------------------------- goto winxp_up :win8 @echo 当前系统是:Windows 8 @echo ---------------------------------------- goto winxp_up :win8.1 @echo 当前系统是:Windows 8.1 @echo ---------------------------------------- goto winxp_up :win10 @echo 当前系统是:Windows 10 @echo ---------------------------------------- goto winxp_up :winxp_dn @echo ---------------------------------------- @echo 正在复制OCX控件文件到系统目录并注册............ copy /y ".\ocx\*.OCX" "%windir%\system32" @echo 复制完成................................. @echo ......................................... @echo 注册OCX文件中............................ %windir%\system32\regsvr32.exe %windir%\system32\MSCOMCT2.OCX /S %windir%\system32\regsvr32.exe %windir%\system32\MSCOMCTL.OCX /S @echo 注册完成................................. @echo ......................................... @echo ......................................... goto end :win7_up @echo 当前系统是:win7 @echo ---------------------------------------- @echo 正在复制OCX控件文件到系统目录并注册............ if %PROCESSOR_ARCHITECTURE%==x86 goto x32 if not %PROCESSOR_ARCHITECTURE%==x86 goto x64 goto end :x64 copy /y ".\ocx\*.OCX" "%windir%\SysWOW64" @echo 复制完成................................. @echo ......................................... @echo 注册OCX文件中............................ %windir%\SysWOW64\regsvr32.exe %windir%\SysWOW64\MSCOMCT2.OCX /S %windir%\SysWOW64\regsvr32.exe %windir%\SysWOW64\MSCOMCTL.OCX /S @echo 注册完成................................. @echo ......................................... @echo ......................................... goto end :x32 copy /y ".\ocx\*.OCX" "%windir%\system32" @echo 复制完成................................. @echo ......................................... @echo 注册OCX文件中............................ %windir%\system32\regsvr32.exe %windir%\system32\MSCOMCT2.OCX /S %windir%\system32\regsvr32.exe %windir%\system32\MSCOMCTL.OCX /S @echo 注册完成................................. @echo ......................................... @echo ......................................... goto end @echo 获取不到当前操作系统的版本,请联系技术员处理! @echo -------------------------------------------------- goto end :end pause复制代码
1152 当前离线
禁止访问
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit复制代码
TOP
WHY 当前离线
上校
极品小猫 当前离线
一级士官
路过 当前离线
三级士官