乔山办公网我们一直在努力
您的位置:乔山办公网 > office365 > 如何用命令提示符<em>激活office</em>2016-批处理 激活 office,用批处理

如何用命令提示符<em>激活office</em>2016-批处理 激活 office,用批处理

作者:乔山办公网日期:

返回目录:office365


1、首先新建一个记事本,然后打开这个新建的记事本。

2、在记事本内输入以下代码:

@echo off
:: 你可以使用文本编辑器(例如记事本)编辑该批处理文件
:: 修改下面内容为你自己指定的 KMS 服务器

::set KMS_Sev=192.168.2.8
set KMS_Sev=kms.lotro.cc
::set KMS_Sev=54.223.212.31
::set KMS_Sev=kms.guowaifuli.com
::set KMS_Sev=mhd.kmdns.net
::set KMS_Sev=xykz.f3322.org
::set KMS_Sev=106.186.25.239
::set KMS_Sev=110.noip.me
::set KMS_Sev=3rss.vicp.net:20439
::set KMS_Sev=45.78.3.223
::set KMS_Sev=kms.chinancce.com
::set KMS_Sev=kms.didichuxing.com
::set KMS_Sev=skms.ddns.net
::set KMS_Sev=zh.us.to
::set KMS_Sev=franklv.ddns.net

::======================= 以下内容无需更改 ======================
setlocal EnableDelayedExpansion&color 3e & cd /d "%~dp0"
title KMS_Activation_for_Office2010_2013_2016 - [hnfeng]
%1 %2
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :runas","","runas",1)(window.close)&goto :eof
:runas
call :strset
cls
if not defined str1 goto en
echo %bar%%bar%%bar%
echo               %str0%
echo.&echo %str1%
echo.&echo %str2%&echo    Office_KMS_Activation.bat
echo.&echo %str3%&echo    Office_KMS_Activation+GVLK.bat
echo.&echo %str4%
echo.&echo %str5%
echo.&echo %str6%
echo.&echo %str7%
echo.&echo %str8%
echo.&echo %str9%
set space=                         
echo.&echo %space%%space%2015.9 hnfeng&echo %bar%%bar%%bar%
timeout /t 30
:en

call :GetOfficePath 14 Office2010
call :ActOffice 14 Office2010
echo %bar%%bar%

call :GetOfficePath 15 Office2013
call :ActOffice 15 Office2013
echo %bar%%bar%

call :GetOfficePath 16 Office2016
call :ActOffice 16 Office2016
echo %bar%%bar%
echo.&pause
exit

:ActOffice
if DEFINED _Office%1Path (
    cd /d "!_Office%1Path!"
    echo.&echo %str10% %2 %str11%
    call :InstallKey %1
    echo.&echo %str12% %2 %str13%...&echo.
    cscript //nologo ospp.vbs /sethst:%KMS_Sev% >nul
    cscript //nologo ospp.vbs /act | find /i "successful" && (
        echo.&echo ***** %2 %str14% ***** & echo.) || (echo.&echo ***** %2 %str15% ***** & echo.)
)    
cd /d "%~dp0"
goto :EOF

:GetOfficePath
echo.&echo %str16% %2 %str17%...
set _Office%1Path=
set _Reg32=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot
set _Reg64=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot
reg query "%_Reg32%" /v "Path" > nul 2>&1 && FOR /F "tokens=2*" %%a IN ('reg query "%_Reg32%" /v "Path"') do SET "_OfficePath1=%%b"
reg query "%_Reg64%" /v "Path" > nul 2>&1 && FOR /F "tokens=2*" %%a IN ('reg query "%_Reg64%" /v "Path"') do SET "_OfficePath2=%%b"
if DEFINED _OfficePath1 (if exist "%_OfficePath1%ospp.vbs" set _Office%1Path=!_OfficePath1!)
if DEFINED _OfficePath2 (if exist "%_OfficePath2%ospp.vbs" set _Office%1Path=!_OfficePath2!)
set _OfficePath1=
set _OfficePath2=
if DEFINED _Office%1Path (echo.&echo %str18% %2 %str13%) else (echo.&echo %str19% %2 %str13%)
goto :EOF

:InstallKey
    call :SetKey%1
    for /l %%i in (1,1,35) do (
        if defined Key%%i (
        cscript //nologo ospp.vbs /inpkey:!Key%%i!  >nul
        ))    
goto :EOF

:SetKey14
:: Office14_Access_KMS_Client
Set Key1=V7Y44-9T38C-R2VJK-666HK-T7DDX
:: Office14_Excel_KMS_Client
Set Key2=H62QG-HXVKF-PP4HP-66KMR-CW9BM
:: Office14_Groove_KMS_Client
Set Key3=QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4
:: Office14_InfoPath_KMS_Client
Set Key4=K96W8-67RPQ-62T9Y-J8FQJ-BT37T
:: Office14_Mondo_KMS_Client
Set Key5=YBJTT-JG6MD-V9Q7P-DBKXJ-38W9R
:: Office14_Mondo_KMS_Client2
Set Key6=7TC2V-WXF6P-TD7RT-BQRXR-B8K32
:: Office14_OneNote_KMS_Client
Set Key7=Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX
:: Office14_Outlook_KMS_Client
Set Key8=7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ
:: Office14_PowerPoint_KMS_Client
Set Key9=RC8FX-88JRY-3PF7C-X8P67-P4VTT
:: Office14_ProjectPro_KMS_Client
Set Key10=YGX6F-PGV49-PGW3J-9BTGG-VHKC6
:: Office14_ProjectStd_KMS_Client
Set Key11=4HP3K-88W3F-W2K3D-6677X-F9PGB
:: Office14_ProPlus_KMS_Client
Set Key12=VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
:: Office14_Publisher_KMS_Client
Set Key13=BFK7F-9MYHM-V68C7-DRQ66-83YTP
:: Office14_SmallBusBasics_KMS_Client
Set Key14=D6QFG-VBYP2-XQHM7-J97RH-VVRCK
:: Office14_Standard_KMS_Client
Set Key15=V7QKV-4XVVR-XYV4D-F7DFM-8R6BM
:: Office14_VisioPrem_KMS_Client
Set Key16=D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ
:: Office14_VisioPro_KMS_Client
Set Key17=7MCW8-VRQVK-G677T-PDJCM-Q8TCP
:: Office14_VisioStd_KMS_Client
Set Key18=767HD-QGMWX-8QTDB-9G3R2-KHFGJ
:: Office14_Word_KMS_Client
Set Key19=HVHB3-C6FV7-KQX9W-YQG79-CRY7T
goto :EOF

:SetKey15
:: Office15_AccessVL_KMS_Client
Set Key1=NG2JY-H4JBT-HQXYP-78QH9-4JM2D
:: Office15_ExcelVL_KMS_Client
Set Key2=VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB
:: Office15_GrooveVL_KMS_Client
Set Key3=DJRB9-N8XJX-WGMWG-BKC2D-628CV
:: Office15_InfoPathVL_KMS_Client
Set Key4=DKT8B-N7VXH-D963P-Q4PHY-F8894
:: Office15_LyncVL_KMS_Client
Set Key5=2MG3G-3BNTT-3MFW9-KDQW3-TCK7R
:: Office15_MondoR_KMS_Automation
Set Key6=CWH2Y-NPYJW-3C7HD-BJQWB-G28JJ
:: Office15_MondoVL_KMS_Client
Set Key7=42QTK-RN8M7-J3C4G-BBGYM-88CYV
:: Office15_OneNoteVL_KMS_Client
Set Key8=TGN6P-8MMBC-37P2F-XHXXK-P34VW
:: Office15_OutlookVL_KMS_Client
Set Key9=QPN8Q-BJBTJ-334K3-93TGY-2PMBT
:: Office15_PowerPointVL_KMS_Client
Set Key10=4NT99-8RJFH-Q2VDH-KYG2C-4RD4F
:: Office15_ProjectProVL_KMS_Client
Set Key11=FN8TT-7WMH6-2D4X9-M337T-2342K
:: Office15_ProjectStdVL_KMS_Client
Set Key12=6NTH3-CW976-3G3Y2-JK3TX-8QHTT
:: Office15_ProPlusVL_KMS_Client
Set Key13=YC7DK-G2NP3-2QQC3-J6H88-GVGXT
:: Office15_PublisherVL_KMS_Client
Set Key14=PN2WF-29XG2-T9HJ7-JQPJR-FCXK4
:: Office15_SharePoint Designer 2013
Set Key15=GYJRG-NMYMF-VGBM4-T3QD4-842DW
:: Office15_StandardVL_KMS_Client
Set Key16=KBKQT-2NMXY-JJWGP-M62JB-92CD4
:: Office15_VisioProVL_KMS_Client
Set Key17=C2FG9-N6J68-H8BTJ-BW3QX-RM3B3
:: Office15_VisioStdVL_KMS_Client
Set Key18=J484Y-4NKBF-W2HMG-DBMJC-PGWR7
:: Office15_WordVL_KMS_Client
Set Key19=6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7
goto :EOF

:SetKey16
:: Office16_AccessVL_KMS_Client
Set Key1=GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW
:: Office16_ExcelVL_KMS_Client
Set Key2=9C2PK-NWTVB-JMPW8-BFT28-7FTBF
:: Office16_MondoR_KMS_Automation
Set Key3=PG4R8-N29HD-MQXDG-QGTYR-CR4RT
:: Office16_MondoVL_KMS_Client
Set Key4=HFTND-W9MK4-8B7MJ-B6C4G-XQBR2
:: Office16_MondoVL_KMS_Client
Set Key5=XHMG7-NCTPT-D8TMC-9YK92-YKMR2
:: Office16_OneNoteVL_KMS_Client
Set Key6=DR92N-9HTF2-97XKM-XW2WJ-XW3J6
:: Office16_OutlookVL_KMS_Client
Set Key7=R69KK-NTPKF-7M3Q4-QYBHW-6MT9B
:: Office16_PowerPointVL_KMS_Client
Set Key8=J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6
:: Office16_ProjectProVL_KMS_Client
Set Key9=YG9NW-3K39V-2T3HJ-93F3Q-G83KT
:: Office16_ProjectStdVL_KMS_Client
Set Key10=GNFHQ-F6YQM-KQDGJ-327XX-KQBVC
:: Office16_ProPlusVL_KMS_Client
Set Key11=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
:: Office16_PublisherVL_KMS_Client
Set Key12=F47MM-N3XJP-TQXJ9-BP99D-8K837
:: Office16_SkypeforBusinessVL_KMS_Client
Set Key13=869NQ-FJ69K-466HW-QYCP2-DDBV6
:: Office16_StandardVL_KMS_Client
Set Key14=JNRGM-WHDWX-FJJG3-K47QV-DRTFM
:: Office16_VisioProVL_KMS_Client
Set Key15=PD3PC-RHNGV-FXJ29-8JK7D-RJRJK
:: Office16_VisioStdVL_KMS_Client
Set Key16=7WHWN-4T7MP-G96JF-G33KR-W8GF4
:: Office16_WordVL_KMS_Client
Set Key17=WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6
goto :EOF

:strset
chcp | find "936" > nul && (
e799bee5baa6e79fa5e98193e78988e69d83362set bar=*************************
set str0=用于 纯批处理 KMS 方式激活 Office 系列产品
set str1=1、该批处理仅用于激活 VL版(VOL,大客户版)Office2010、2013、2016(未测试)
set str2=2、如果你默认安装的Office VL版(例如未输入过其他的MAK),建议使用:
set str3=3、如果你安装的Office VL版曾经输入过其他的MAK,建议使用:
set str4=4、如果你安装的是零售版的Office,请先使用转换工具转换为VL版,或重新安装VL版
set str5=5、支持系统中同时安装有不同版本的Office(例如2010+2013)
set str6=6、支持32位系统安装32位Office,64位系统安装32位或64位Office
set str7=7、支持自定义的Office安装路径(例如把Office安装到其他磁盘)
set str8=8、本人不对该批处理作任何保证,请自己斟酌风险,并决定是否使用
set str9=9、按任意键继续(超时后自动继续),按 Ctrl+C 退出
set str10=正在安装
set str11=系列产品密钥,请稍等...
set str12=尝试激活
set str13=系列产品
set str14=激活成功
set str15=激活失败
set str16=正在检测
set str17=系列产品的安装路径
set str18=已发现
set str19=未发现
)
chcp | find "950" > nul && (
set bar=*************************
set str0=ノ у矪瞶 KMS よΑ币ノ Office ╰玻珇
set str1=1赣у矪瞶度ノ币ノ VLVOL,めOffice201020132016ゼ代刚
set str2=2狦纐粄杆Office VLㄒゼ块筁ㄤMAK某ㄏノ
set str3=3狦杆Office VL纯竒块筁ㄤMAK某ㄏノ
set str4=4狦杆琌箂扳Office叫ㄏノ锣传ㄣ锣传VL┪穝杆VL
set str5=5や╰参い杆ΤぃセOfficeㄒ2010+2013
set str6=6や32╰参杆32Office64╰参杆32┪64Office
set str7=7や﹚竡Office杆隔畖ㄒрOffice杆ㄤ合弦
set str8=8セぃ癸赣у矪瞶ヴ玂谍叫穜皍繧∕﹚琌ㄏノ
set str9=9ヴ种龄膥尿禬笆膥尿 Ctrl+C 癶
set str10=タ杆
set str11=╰玻珇盏芲叫祔单...
set str12=沽刚币ノ
set str13=╰玻珇
set str14=币ノΘ
set str15=币ノア毖
set str16=タ浪代
set str17=╰玻珇杆竚
set str18=祇瞷
set str19=ゼ祇瞷
)
if not defined str1 (
set bar=*************************
set str1=
set str10=Installing
set str11=GVLK, Just a moment, please...
set str12=Trying to activate
set str13=series products
set str14=activation success
set str15=activation failure
set str16=Identifying install_path of
set str17=series products
set str18=Have been found
set str19=Not found
)
goto :EOF

3、保存后关闭,将新建的记事本重命名,将后缀“.txt”改为“.bat”。



虾折腾自己 ?
应该和普通的2016标准版是一样的,可以网上下载KMS工具,进行免费激活

如有帮助,请采纳
--六九工作室

@echo off
set srt=\Microsoft Office\Office16
if exist "%ProgramFiles%%srt%" (cd /d "%ProgramFiles%%srt%") else (
cd /d "%ProgramFiles(x86)%%srt%")
cscript ospp.vbs /sethst:IP地址 
cscript ospp.vbs /act
pause

相关阅读

关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网