自建kms服务器

  1. 参考连接https://teddysun.com/530.html
  2. vps中运行wget --no-check-certificate https://github.com/teddysun/across/raw/master/kms.sh && chmod +x kms.sh && ./kms.sh
  3. 启动:/etc/init.d/kms start
    停止:/etc/init.d/kms stop
    重启:/etc/init.d/kms restart
    状态:/etc/init.d/kms status
  4. 卸载:./kms.sh uninstall
  5. 本地系统激活:
    1. 查看系统版本:wmic os get caption 
    2. 卸载系统key:slmgr /upk
    3. 输入对应系统的key:slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
    4. 输入kms服务器地址:slmgr /skms Your IP or Domain:1688
    5. 激活:slmgr /ato
  6. 本地office激活:
    1. 进入office安装目录:cd C:\Program Files (x86)\Microsoft Office\Office16
    2. 注册key:cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
    3. 注册kms:cscript ospp.vbs /sethst:Your IP or Domain
    4. 激活:cscript ospp.vbs /act
    5. 激活有效期查看:cscript ospp.vbs /dstatus
    6. 激活的过程中如果出现“The Software Licensing Service reported that the product SKU is not found.”错误,运行以下bat程序
      @echo off
      :ADMIN
      openfiles >nul 2>nul ||(
      echo CreateObject^("Shell.Application"^).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
      
      setlocal
      
      pushd "%~dp0"
      Title Office 2019 Retail to Volume License Converter
      
      rem	SET OfficePath=%ProgramFiles%\Microsoft Office
      SET OfficePath=%ProgramFiles%\Microsoft Office
      if not exist "%OfficePath%\root\Licenses16" SET OfficePath=%ProgramFiles(x86)%\Microsoft Office
      if not exist "%OfficePath%\root\Licenses16" (
      	echo Could not find the license files for Office 2019!
      	pause
      	goto :eof
      )
      
      echo Press Enter to start VL-Conversion...
      echo.
      pause
      echo.
      cd /D "%SystemRoot%\System32"
      
      if %win% GEQ 9200 (
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\ProPlus2019VL_KMS_Client_AE-ppd.xrm-ms"
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\ProPlus2019VL_KMS_Client_AE-ul.xrm-ms"
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\ProPlus2019VL_KMS_Client_AE-ul-oob.xrm-ms"
      
      
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\client-issuance-bridge-office.xrm-ms
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\client-issuance-root.xrm-ms
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\client-issuance-root-bridge-test.xrm-ms
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\client-issuance-stil.xrm-ms
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\client-issuance-ul.xrm-ms
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\client-issuance-ul-oob.xrm-ms
      	cscript slmgr.vbs /ilc "%OfficePath%\root\Licenses16\pkeyconfig-office.xrm-ms
      )
       if %win% LSS 9200 (
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\ProPlus2019VL_KMS_Client_AE-ppd.xrm-ms"
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\ProPlus2019VL_KMS_Client_AE-ul.xrm-ms"
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\ProPlus2019VL_KMS_Client_AE-ul-oob.xrm-ms"
      
      
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\client-issuance-bridge-office.xrm-ms
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\client-issuance-root.xrm-ms
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\client-issuance-root-bridge-test.xrm-ms
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\client-issuance-stil.xrm-ms
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\client-issuance-ul.xrm-ms
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\client-issuance-ul-oob.xrm-ms
      	cscript "%OfficePath%\Office16\ospp.vbs" /inslic:"%OfficePath%\root\Licenses16\pkeyconfig-office.xrm-ms
      )
      
      cscript "%OfficePath%\Office16\ospp.vbs" /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
      cscript "%OfficePath%\Office16\ospp.vbs" /act
      
      echo.
      echo Retail to Volume License conversion finished.
      echo.
      pause

发表评论

电子邮件地址不会被公开。 必填项已用*标注