激活office2019

脚本激活office2019(仅限office2019)

将如下代码复制到txt中,再将文件后缀名改为bat,使用管理员权限运行此脚本

​
@echo off
chcp 65001
title 免费激活Office 2019
cls
echo #支持的Office版本:
echo - Microsoft Office Standard 2019
echo - Microsoft Office Professional Plus 2019
echo.
(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")
(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")
(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)
(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)
echo.
echo 开始激活...
cscript //nologo ospp.vbs /unpkey:6MWKP >nul&cscript //nologo ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP >nul
set i=1
:server
if %i%==1 set KMS_Sev=kms8.MSGuides.com
if %i%==2 set KMS_Sev=kms9.MSGuides.com
if %i%==3 set KMS_Sev=kms.03k.org
if %i%==4 set KMS_Sev=ss.byelliot.top
if %i%==5 set KMS_Sev=kms.library.hk
if %i%==6 set KMS_Sev=kms.cangshui.net
if %i%==7 goto notsupported
cscript //nologo ospp.vbs /sethst:%KMS_Sev% >nul
echo.
cscript //nologo ospp.vbs /act | find /i "successful" && (echo.&echo 激活成功 &echo.) || (echo KMS地址连接失败,开始尝试其他地址,请稍等... & echo. & set /a i+=1 & goto server)
goto halt
:notsupported
echo.
echo 激活失败
:halt
pause >nul

你可能感兴趣的:(工具)