@ECHO了
对本地ENABLEDELAYEDEXPANSION
::模式反对:关口=65行=25颜色
0
::批处理获取管理员权限
: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% 1 mshta vbscript: createobject (“shell.application") .shellexecute (“““% ~ 0“““,“::”,,“runas", 1) (window.close),及出口/b
pushd“% CD %“
CD/D“% ~ dp0"
: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
设置BatPath=% ~ dp0
设置BatPath=% BatPath: ~ 0, -1%
/f“令牌=6 delims=[]。“;% % G(“版本”)做组赢=% % G
rem判断32/64位
设置“ospp=% ProgramFiles % \ Microsoft Office \ Office16 \ ospp.vbs"
如果不存在“% ospp %,(
设置“ospp=% ProgramFiles (x86) % \ Microsoft Office \ Office16 \ ospp.vbs"
)
: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
:设置变量===============================
设置ip=172.19.34.146
:开始公里服务器==========================
: 172.19.32.146
如果%返回码% EQU 0 (
回声连接公里服务器:% ip %成功!
呼应。
)其他(goto: 172.19.34.146)
:开始激活===============================
的回声。办公室正在激活……
::卸载已安装的产品密钥。后面的数字是密钥的最后5位数。
:: cscript ospp。根据/unpkey: xxxxx
::办公室专业+关键
:: Visio专业关键
::项目专业关键
cscript“% ospp %,/inpkey: XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99祝辞nul
cscript“% ospp %,/inpkey: PD3PC-RHNGV-FXJ29-8JK7D-RJRJK祝辞nul
cscript“% ospp %,/inpkey: yg9nw - 3 - k39v 2 - t3hj - 93 - f3q g83kt祝辞nul
cscript“% ospp %,/sethst: % ip %祝辞nul
cscript“% ospp %,/
暂停行动
: dstatus
cls
回声办公室激活状态……
cscript“% ospp %,暂停/dstatus
goto:退出退出
: