if exist "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office14"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office14\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office14"
cscript ospp.vbs /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
cscript ospp.vbs /sethst:kms.343.re
cscript ospp.vbs /act
cscript ospp.vbs /dstatus
if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office15"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office15"
cscript ospp.vbs /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT
cscript ospp.vbs /sethst:kms.343.re
cscript ospp.vbs /act
cscript ospp.vbs /dstatus
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"
cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
cscript ospp.vbs /sethst:kms.343.re
cscript ospp.vbs /act
cscript ospp.vbs /dstatus
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"
cscript ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
cscript ospp.vbs /sethst:kms.343.re
cscript ospp.vbs /act
cscript ospp.vbs /dstatus
命令 | 说明 |
---|---|
cscript ospp.vbs /dstatus | 显示当前已安装产品密钥的许可证信息 |
cscript ospp.vbs /dstatusall | 显示当前已安装的所有许可证信息 |
cscript ospp.vbs /unpkey:XXXXX | 卸载已安装的产品密钥(最后5位) |
cscript ospp.vbs /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX | 安装产品密钥 |
cscript ospp.vbs /sethst:kms.343.re | 设置 KMS 主机名 |
cscript ospp.vbs /remhst | 删除 KMS 主机名 |
cscript ospp.vbs /act | 激活 Office |
以上命令仅用于激活VL版本的Office,如果当前为Retail版本,请先转化为批量授权版本。