当前位置: 主页 > Office办公 > 其他专区 > Visio > KMS_Office_2010_Plus-Visio-Project激活脚本

KMS_Office_2010_Plus-Visio-Project激活脚本

  • 2021-12-11
  • 来源/作者: 菜鸟图库/ 菜鸟图库
  • 586 次浏览

@ECHO OFF
setlocal ENABLEDELAYEDEXPANSION
Title KMS Office 系列 [Comlan]
::mode con: cols=65 lines=25
color 0A

:: 批处理获取管理员权限
:-------------------------------------
%1 mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&&exit /b
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
set BatPath=%~dp0
set BatPath=%BatPath:~0,-1%
for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G

rem 判断32/64位
set "ospp=%ProgramFiles%\Microsoft Office\Office14\ospp.vbs"
if not exist "%ospp%" (
set "ospp=%ProgramFiles(x86)%\Microsoft Office\Office14\ospp.vbs"
)
:--------------------------------------

:设置变量===============================
set ip=172.19.34.146

:开始KMS服务器==========================

:172.19.32.146
if %errorlevel% EQU 0 (
echo 连接 KMS 服务器:%ip% 成功!
echo.
) else ( goto :172.19.34.146 )

:开始激活===============================
ECHO.Office 正在激活……

::卸载已安装的产品密钥。后面的数字是密钥的最后5位数。
::cscript ospp.vbs /unpkey:xxxxx

::Office Professional Plus Key
::Visio Professional Key
::Project Professional Key
cscript "%ospp%" /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB >nul
cscript "%ospp%" /inpkey:7MCW8-VRQVK-G677T-PDJCM-Q8TCP >nul
cscript "%ospp%" /inpkey:YGX6F-PGV49-PGW3J-9BTGG-VHKC6 >nul

cscript "%ospp%" /sethst:%ip% >nul
cscript "%ospp%" /act
pause

:dstatus
cls
echo Office 激活状态……
cscript "%ospp%" /dstatus
pause

goto :Exit
:Exit

标签(TAG) Visio激活脚本