本文最后更新于(2019-8-26 14:29:03),链接可能失效,内容可能难以复现。请注意甄别。
1.判断系统架构
if "%PROCESSOR_ARCHITECTURE%"=="x86" goto x86 if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto x64 exit :x64 echo 64&goto eof exit :x86 echo 32&goto eof exit :eof echo All done.运行结果(64):
64 All done.运行结果(32):
32 All done.2.依次执行任务
@echo off echo 正在激活Windows... slmgr /skms kms.03k.org start /w slmgr /ato echo Product activation successful.(1/2) echo 正在激活Office... cd "C:\Program Files\Microsoft Office\Office16" cscript ospp.vbs /sethst:kms.03k.org cscript ospp.vbs /act echo Product activation successful.(2/2) pause