原文链接:https://blog.csdn.net/godot06/article/details/94141854
步骤如下:
1.电脑新建一个记事本文件.txt(任何地方都可以)
2.复制下面代码到新建记事本文件.txt中,并保存
@echo off title Activate Microsoft Visio 2019&cls&echo ============================================================================&echo #Visio: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Visio Standard 2019&echo - Microsoft Visio Professional Plus 2019&echo.&echo.&(if exist "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" cd /d "%ProgramFiles%Microsoft OfficeOffice16")&(if exist "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" cd /d "%ProgramFiles(x86)%Microsoft OfficeOffice16")&cscript //nologo ospp.vbs /inslic:".. ootLicenses16pkeyconfig-office.xrm-ms" >nul&(for /f %%x in ('dir /b .. ootLicenses16client-issuance*.xrm-ms') do cscript ospp.vbs /inslic:".. ootLicenses16\%%x" >nul)&(for /f %%x in ('dir /b .. ootLicenses16visioprovl_kms*.xrm-ms') do cscript ospp.vbs /inslic:".. ootLicenses16\%%x" >nul)&(for /f %%x in ('dir /b .. ootLicenses16visiopro2019vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:".. ootLicenses16\%%x" >nul)&echo.&echo ============================================================================&echo 正在尝试激活...&cscript //nologo ospp.vbs /unpkey:7VCBB >nul&cscript //nologo ospp.vbs /inpkey:9BGNQ-K37YR-RQHF2-38RQ3-7VCBB >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=kms7.MSGuides.com if %i%==4 goto notsupported cscript //nologo ospp.vbs /sethst:%KMS_Sev% >nul&echo ============================================================================&echo.&echo. cscript //nologo ospp.vbs /act | find /i "successful" && (echo 已完成,按任意键退出) || (echo 连接KMS服务器失败! 试图连接到另一个… & echo 请等待... & echo. & echo. & set /a i+=1 & goto server) pause >nul exit
3.上述记事本文件.txt后缀成.bat 的Windows可执行脚本文件
4.直接右键使用管理员权限身份打开修改后的.bat文件
5.耐心等待一会,不要以为没有执行,等一会会有打印记录