您好,登錄后才能下訂單哦!
@ECHO OFF
setlocal ENABLEDELAYEDEXPANSION
::mode con: cols=65 lines=25
color 0A
:: 批處理獲取管理員權限
:-------------------------------------
%1 mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&&exit /b
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
set BatPath=%~dp0
set BatPath=%BatPath:~0,-1%
for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G
rem 判斷32/64位
set "ospp=%ProgramFiles%\Microsoft Office\Office16\ospp.vbs"
if not exist "%ospp%" (
set "ospp=%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs"
)
:--------------------------------------
:設置變量===============================
set ip=172.19.34.146
:開始KMS服務器==========================
:172.19.32.146
if %errorlevel% EQU 0 (
echo 連接 KMS 服務器:%ip% 成功!
echo.
) else ( goto :172.19.34.146 )
:開始激活===============================
ECHO.Office 正在激活……
::卸載已安裝的產品密鑰。后面的數字是密鑰的最后5位數。
::cscript ospp.vbs /unpkey:xxxxx
::Office Professional Plus Key
::Visio Professional Key
::Project Professional Key
cscript "%ospp%" /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 >nul
cscript "%ospp%" /inpkey:PD3PC-RHNGV-FXJ29-8JK7D-RJRJK >nul
cscript "%ospp%" /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT >nul
cscript "%ospp%" /sethst:%ip% >nul
cscript "%ospp%" /act
pause
:dstatus
cls
echo Office 激活狀態……
cscript "%ospp%" /dstatus
pause
goto :Exit
:Exit
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。