• 激活office2016的心路历程


    先转换成VOL版本

    32位的office2016用如下代码

    @echo off
    :ADMIN
    openfiles >nul 2>nul ||(
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs"
    "%temp%getadmin.vbs" >nul 2>&1
    goto:eof
    )
    del /f /q "%temp%getadmin.vbs" >nul 2>nul
    
    for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G
    
    pushd "%~dp0"
    Title Office 2016 Retail to Volume License Converter
    
    echo Press Enter to start VL-Conversion...
    echo.
    pause
    echo.
    cd /D "%SystemRoot%System32"
    
    if %win% GEQ 9200 (
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ppd.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul-oob.xrm-ms"
    
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ppd.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul-oob.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul.xrm-ms"
    
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ppd.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul-oob.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul.xrm-ms"
    
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-bridge-office.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-root.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-root-bridge-test.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-stil.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-ul.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-ul-oob.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles(x86)%Microsoft Office
    ootLicenses16pkeyconfig-office.xrm-ms
    )
    if %win% LSS 9200 (
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ppd.xrm-ms"
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul.xrm-ms"
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul-oob.xrm-ms"
    
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ppd.xrm-ms"
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul-oob.xrm-ms"
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul.xrm-ms"
    
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ppd.xrm-ms"
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul-oob.xrm-ms"
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul.xrm-ms"
    
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-bridge-office.xrm-ms
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-root.xrm-ms
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-root-bridge-test.xrm-ms
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-stil.xrm-ms
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-ul.xrm-ms
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16client-issuance-ul-oob.xrm-ms
    cscript "%ProgramFiles(x86)%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles(x86)%Microsoft Office
    ootLicenses16pkeyconfig-office.xrm-ms
    )
    echo.
    echo Retail to Volume License conversion finished.
    echo.
    pause

    64位的用如下代码

    @echo off
    :ADMIN
    openfiles >nul 2>nul ||(
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs"
    "%temp%getadmin.vbs" >nul 2>&1
    goto:eof
    )
    del /f /q "%temp%getadmin.vbs" >nul 2>nul
    
    for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G
    
    pushd "%~dp0"
    Title Office 2016 Retail to Volume License Converter
    
    echo Press Enter to start VL-Conversion...
    echo.
    pause
    echo.
    cd /D "%SystemRoot%System32"
    
    if %win% GEQ 9200 (
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ppd.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul-oob.xrm-ms"
    
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ppd.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul-oob.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul.xrm-ms"
    
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ppd.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul-oob.xrm-ms"
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul.xrm-ms"
    
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-bridge-office.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-root.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-root-bridge-test.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-stil.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-ul.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-ul-oob.xrm-ms
    cscript slmgr.vbs /ilc "%ProgramFiles%Microsoft Office
    ootLicenses16pkeyconfig-office.xrm-ms
    )
    if %win% LSS 9200 (
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ppd.xrm-ms"
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul.xrm-ms"
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16ProPlusVL_KMS_Client-ul-oob.xrm-ms"
    
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ppd.xrm-ms"
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul-oob.xrm-ms"
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16ProjectProVL_KMS_Client-ul.xrm-ms"
    
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ppd.xrm-ms"
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul-oob.xrm-ms"
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16VisioProVL_KMS_Client-ul.xrm-ms"
    
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-bridge-office.xrm-ms
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-root.xrm-ms
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-root-bridge-test.xrm-ms
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-stil.xrm-ms
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-ul.xrm-ms
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16client-issuance-ul-oob.xrm-ms
    cscript "%ProgramFiles%Microsoft OfficeOffice16ospp.vbs" /inslic:"%ProgramFiles%Microsoft Office
    ootLicenses16pkeyconfig-office.xrm-ms
    )
    echo.
    echo Retail to Volume License conversion finished.
    echo.
    pause

    然后以管理员的身份运行CMD或PowerShell,使用下面的三句代码

    cd "C:Program Files (x86)Microsoft OfficeOffice16>"

    cscript ospp.vbs /sethst:kms.03k.org
    cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
    cscript ospp.vbs /act

    解释:/sethst参数就是指定kms服务器地址。也可以改成cscript ospp.vbs /sethst:ss.yechiu.xin

    这样就可以了

    如果安装时自已输入过网上百度来的密钥,那行就得执行下面的代码,来删除掉不可以用的密钥

    PS C:Program Files (x86)Microsoft OfficeOffice16> cscript ospp.vbs /dstatus                                          Microsoft (R) Windows Script Host Version 5.812
    版权所有(C) Microsoft Corporation。保留所有权利。
    
    ---Processing--------------------------
    ---------------------------------------
    PRODUCT ID: 00346-40000-00000-AA453
    SKU ID: 70d9ceb6-6dfa-4da4-b413-18c1c3c76e2e
    LICENSE NAME: Office 16, Office16ProPlusR_Grace edition
    LICENSE DESCRIPTION: Office 16, RETAIL(Grace) channel
    BETA EXPIRATION: 1601/1/1
    LICENSE STATUS:  ---OOB_GRACE---
    ERROR CODE: 0x4004F00C
    ERROR DESCRIPTION: The Software Licensing Service reported that the application is running within the valid grace period.
    REMAINING GRACE: 4 days  (7067 minute(s) before expiring)
    Last 5 characters of installed product key: BTDRB
    ---------------------------------------
    PRODUCT ID: 00339-10000-00000-AA978
    SKU ID: d450596f-894d-49e0-966a-fd39ed4c4c64
    LICENSE NAME: Office 16, Office16ProPlusVL_KMS_Client edition
    LICENSE DESCRIPTION: Office 16, VOLUME_KMSCLIENT channel
    BETA EXPIRATION: 1601/1/1
    LICENSE STATUS:  ---LICENSED---
    REMAINING GRACE: 179 days  (259190 minute(s) before expiring)
    Last 5 characters of installed product key: WFG99
    Activation Type Configuration: ALL
            DNS auto-discovery: KMS name not available
            KMS machine registry override defined: kms.03k.org:1688
            Activation Interval: 120 minutes
            Renewal Interval: 23303 minutes
            KMS host caching: Enabled
    ---------------------------------------
    PRODUCT ID: 00338-97657-12461-AA293
    SKU ID: de52bd50-9564-4adc-8fcb-a345c17f84f9
    LICENSE NAME: Office 16, Office16ProPlusR_Retail edition
    LICENSE DESCRIPTION: Office 16, RETAIL channel
    BETA EXPIRATION: 1601/1/1
    LICENSE STATUS:  ---OOB_GRACE---
    ERROR CODE: 0x4004F00C
    ERROR DESCRIPTION: The Software Licensing Service reported that the application is running within the valid grace period.
    REMAINING GRACE: 29 days  (43069 minute(s) before expiring)
    Last 5 characters of installed product key: CYT97
    ---------------------------------------
    ---------------------------------------
    ---Exiting-----------------------------

    记住上面出现过的key 就是报ERROR CODE下面的第三句的key

    最后输入此命令删除多余的激活码:cscript ospp.vbs /unpkey:CYT97(有提示剩余天数那一栏的激活码)
    面板会显示如下即删除成功
    Microsoft (R) Windows Script Host Version 5.812
    版权所有(C) Microsoft Corporation。保留所有权利。
    ---Processing--------------------------
    ---------------------------------------
    Uninstalling product key for: Office 16, Office16ProPlusVL_KMS_Client edition
    <Product key uninstall successful>
    ---------------------------------------
    ---Exiting-----------------------------
  • 相关阅读:
    Selenium(三)webdriver的API与定位元素
    代码验证和动手动脑
    课程作业01实验报告1,2,3
    动手动脑
    课程作业03实验报告
    课程作业02实验报告
    猜数字实验报告
    java各种问题总结和一些讨论
    java从命令行接受多个数字并求和
    java登陆界面实验报告
  • 原文地址:https://www.cnblogs.com/jiangyunfeng/p/11920526.html
Copyright © 2020-2023  润新知