In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to enable KMS to automatically activate windows and office scripts. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
First, you have to have a kms server, kmsserver.XXXXX.com.
@ echo off
Setlocal EnableDelayedExpansion & cd / d "% ~ dp0"
Title KMS Activation script
1 2
Ver | find "5." > nul&&goto: xptooff
Mshta _ vbscript:createobject ("shell.application") .shellexecute ("% ~ S0", "goto: start", "", "runas", 1) (window.close) & goto: eof
: start
Cls
Echo. & echo is checking the activation server.
Echo.
Ping kmsserver.XXXXX.com | find "timeout" > NUL & & goto fail
Ping kmsserver.XXXXX.com | find "target host" > NUL & & goto fail
Echo has successfully connected to the server and begins to check the system activation, which will automatically skip the permanently activated.
Cscript / / Nologo% windir%\ system32\ slmgr.vbs / xpr | find has been permanently activated > NUL&&goto wintooff
Ver | find "6.0." > NUL & & goto winvista
Ver | find "6.1." > NUL & & goto win7
Ver | find "6.2." > NUL & & goto win8
Ver | find "6.3." > NUL & & goto win81
Ver | find "10.0." > NUL & & goto win10
Echo did not find a suitable NT6 system, possibly WinXP or Win2003.
Goto office
: winvista
Echo.
Echo is currently Windows Vista/2008, start trying to activate.
Echo.
Set Business=YFKBB-PQJJV-G996G-VWGXY-2V3X8
Set BusinessN=HMBQG-8H2RH-C77VX-27R82-VMQBT
Set Enterprise=VKK3X-68KWM-X2YGT-QR4M6-4BWMV
Set EnterpriseN=VTC42-BM838-43QHV-84HX6-XJXKV
Set ServerWeb=WYR28-R7TFJ-3X2YQ-YCY4H-M249D
Set ServerStandard=TM24T-X9RMF-VWXK6-X8JC9-BFGM2
Set ServerStandardV=W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ
Set ServerEnterprise=YQGMW-MPWTJ-34KDK-48M3W-X4Q6V
Set ServerEnterpriseV=39BXF-X8Q23-P2WWT-38T2F-G3FPG
Set ServerWeb=RCTX3-KWVHP-BR6TB-RB6DM-6X7HP
Set ServerDatacenter=7M67G-PC374-GR742-YH8V4-TCBY3
Set ServerDatacenterV=22XQ2-VRXRG-P8D42-K34TD-G3QQC
Set ServerEnterpriseIA64=4DWFP-JF3DJ-B7DTH-78FJB-PDRHK
Goto windowsstart
: win7
Echo.
Echo is currently Windows 7 Compact 2008 R2, start trying to activate.
Echo.
Set Professional=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
Set Professional=GMJQF-JC7VC-76HMH-M4RKY-V4HX6
Set ProfessionalN=MRPKT-YTG23-K7D7T-X2JMM-QY7MG
Set ProfessionalE=W82YF-2Q76Y-63HXB-FGJG9-GF7QX
Set Enterprise=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
Set EnterpriseN=YDRBP-3D83W-TY26F-D46B2-XCKRJ
Set EnterpriseE=C29WB-22CC8-VJ326-GHFJW-H9DH4
Set Ultimate=49PB6-6BJ6Y-KHGCQ-7DDY6-TF7CD
Set HomePremium=CQBVJ-9J697-PWB9R-4K7W4-2BT4J
Set HomeBasic=2P6PB-G7YVY-W46VJ-BXJ36-PGGTG
Set Starter=273P4-GQ8V6-97YYM-9YTHF-DC2VP
Set ServerWeb=6TPJF-RBVHG-WBW2R-86QPH-6RTM4
Set ServerHPC=TT8MH-CG224-D3D7Q-498W2-9QCTX
Set ServerStandard=YC6KT-GKW9T-YTKYR-T4X34-R7VHC
Set ServerEnterprise=489J6-VHDMP-X63PK-3K798-CPX3Y
Set ServerDatacenter=74YFP-3QFB3-KQT8W-PMXWJ-7M648
Set ServerEnterpriseIA64=GT63C-RJFQ3-4GMB6-BRFB9-CB83V
Goto windowsstart
: win8
Echo.
Echo is currently Windows 8 Compact 2012, start trying to activate.
Echo.
Set Professional=NG4HW-VH26C-733KW-K6F98-J8CK4
Set ProfessionalN=XCVCF-2NXM9-723PB-MHCB7-2RYQQ
Set Core=BN3D2-R7TKB-3YPBD-8DRP2-27GG4
Set Enterprise=32JNW-9KQ84-P47T8-D8GGY-CWCK7
Set EnterpriseN=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT
Set CoreN=8N2M2-HWPGY-7PGT9-HGDD8-GVGGY
Set CoreSingleLanguage=2WN2H-YGCQR-KFX6K-CD6TF-84YXQ
Set CoreCountrySpecific=4K36P-JN4VD-GDC6V-KDT89-DYFKP
Set ServerMultiPointPremium=XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G
Set ServerMultiPointStandard=HM7DN-YVMH3-46JC3-XYTG7-CYQJJ
Set ServerStandard=XC9B7-NBPP2-83J2H-RHMBY-92BT4
Set ServerDatacenter=48HP8-DN98B-MYWDG-T2DCC-8W83P
Set ProfessionalWMC=GNBB8-YVD74-QJHX6-27H4K-8QHDG
Set CoreARM=DXHJF-N9KQX-MFPVR-GHGQK-Y7RKV
Goto windowsstart
: win81
Echo.
Echo is currently Windows 8.1, start trying to activate.
Echo.
Set Core=M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK
Set CoreARM=XYTND-K6QKT-K2MRH-66RTM-43JKP
Set CoreCountrySpecific=NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3
Set CoreN=7B9N3-D94CG-YTVHR-QBPX3-RJP64
Set CoreSingleLanguage=BB6NG-PQ82V-VRDPW-8XVD2-V8P66
Set EmbeddedIndustry=NMMPB-38DD4-R2823-62W8D-VXKJB
Set EmbeddedIndustryA=VHXM3-NR6FT-RY6RT-CK882-KW2CJ
Set EmbeddedIndustryE=FNFKF-PWTVT-9RC8H-32HB2-JB34X
Set Enterprise=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7
Set EnterpriseN=TT4HM-HN7YT-62K67-RGRQJ-JFFXW
Set Professional=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9
Set ProfessionalN=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY
Set ProfessionalWMC=789NJ-TQK6T-6XTH8-J39CJ-J8D3P
Set ServerCloudStorageCore=3NPTF-33KPT-GGBPR-YX76B-39KDD
Set ServerCloudStorage=3NPTF-33KPT-GGBPR-YX76B-39KDD
Set ServerDatacenter=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
Set ServerDatacenterCore=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
Set ServerStandard=D2N9P-3P6X9-2R39C-7RTCD-MDVJX
Set ServerStandardCore=D2N9P-3P6X9-2R39C-7RTCD-MDVJX
Set ServerSolution=KNC87-3J2TX-XB4WP-VCPJV-M4FWM
Set ServerSolutionCore=KNC87-3J2TX-XB4WP-VCPJV-M4FWM
Goto windowsstart
: win10
Echo.
Echo. & echo is currently Windows 10, start trying to activate.
Echo.
Set Core=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Set CoreCountrySpecific=PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Set CoreN=3KHY7-WNT83-DGQKR-F7HPR-844BM
Set CoreSingleLanguage=7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
Set ProfessionalStudent=YNXW3-HV3VB-Y83VG-KPBXM-6VH3Q
Set ProfessionalStudentN=8G9XJ-GN6PJ-GW787-MVV7G-GMR99
Set Professional=W269N-WFGWX-YVC9B-4J6C9-T83GX
Set Professional=NXRQM-CXV6P-PBGVJ-293T4-R3KTY
Set Professional=N7CXQ-RW8G8-QT9RC-9BBRH-YY49M
Set Professional=YC7N8-G7WR6-9WR4H-6Y2W4-KBT6X
Set ProfessionalN=MH37W-N47XK-V7XM9-C7227-GCQG9
Set ProfessionalSN=8Q36Y-N2F39-HRMHT-4XW33-TCQR4
Set ProfessionalWMC=NKPM6-TCVPT-3HRFX-Q4H9B-QJ34Y
Set ProfessionalEducation=6TP4R-GNPTD-KYYHQ-7B7DP-J447Y
Set ProfessionalEducationN=YVWGF-BXNMC-HTQYQ-CPQ99-66QFC
Set Education=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
Set Education=YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY
Set EducationN=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ
Set Enterprise=NPPR9-FWDCX-D2C8J-H872K-2YT43
Set Enterprise=VY72Q-T3NYM-MJ2MJ-9M8Q9-M98WR
Set Enterprise=DF4VN-TGK62-CC8YB-CDQ2H-HXMPF
Set EnterpriseN=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
Set EnterpriseS=WNMTR-4C88C-JK8YV-HQ7T2-76DF9
Set EnterpriseSN=2F77B-TNFGY-69QQF-B8YKP-D69TJ
Set EnterpriseN=DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ
Set EnterpriseSN=QFFDN-GRT3P-VKWWX-X7T3R-8B639
Set EnterpriseG=YYVX9-NTFWV-6MDM3-9PT4T-4M68B
Set EnterpriseGN=44RPN-FTY23-9VTTB-MP9BX-T84FV
Goto windowsstart
: windowsstart
For / f "tokens=3 delims="% I in ('reg QUERY "HKLM\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion" / v "EditionID"') do set EditionID=%%i
If defined% EditionID% (
Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ipk!% EditionID%!
Cscript / / Nologo% windir%\ system32\ slmgr.vbs / skms kmsserver.XXXXX.com
Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato
) else (
Echo can't find the serial number, maybe it's the flagship version of the system.
)
Goto office
: wintooff
The echo system has been permanently activated!
The next step of echo starts to transfer to Office activation.
Goto office
: office
Echo checks the installed office...
Call: GetOfficePath 14 Office2010
Call: ActOffice 14 Office2010
Call: GetOfficePath 15 Office2013
Call: ActOffice 15 Office2013
If exist "% ProgramFiles%\ Microsoft Office\ Office16\ ospp.vbs" set _ Office16Path=%ProgramFiles%\ Microsoft Office\ Office16
If exist "% ProgramFiles (x86)%\ Microsoft Office\ Office16\ ospp.vbs" set _ Office16Path=%ProgramFiles (x86)%\ Microsoft Office\ Office16
If DEFINED _ Office16Path (Office2016 has been discovered by echo.&echo
Call: ActOffice 16 Office2016
) else (Office2016 not found by echo.&echo)
The echo operation completed successfully!
Start "" slmgr.vbs-dlv "
Echo.&pause
Exit
: ActOffice
If DEFINED _ Office%1Path (
Cd / d "! _ Office%1Path!"
Echo checks the activation status of% 2.
Cscript / / nologo ospp.vbs / act | find / I "successful" > NUL & (
Echo.&echo% 2 has been activated, skip & echo.) | | (
Echo.&echo 2 is not activated and is attempting to activate.
If 1 EQU 16 call: Licens16
Cscript / / nologo ospp.vbs / sethst:kmsserver.XXXXX.com > nul
Cscript / / nologo ospp.vbs / act | find / I "successful" & & (
Echo.&echo *% 2 Activation succeeded * & echo.) | (echo.&echo *% 2 Activation failed * & echo.)
)
)
Cd / d "% ~ dp0"
Goto: EOF
: GetOfficePath
Echo.&echo is testing the installation path for% 2 series products.
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*"% an IN ('reg query "% _ Reg32%" / v "Path"') do SET "_ OfficePath2=%%b"
Reg query "% Reg64%" / v "Path" > nul 2 > & 1 & & FOR / F "tokens=2*"% an IN ('reg query "% _ Reg64%" / v "Path"') do SET "_ OfficePath3=%%b"
If DEFINED _ OfficePath2 (if exist "% _ OfficePath2%ospp.vbs" set _ Office% 1 Pathology needs Office Path2!)
If DEFINED _ OfficePath3 (if exist "% _ OfficePath3%ospp.vbs" set _ Office% 1 Pathology needs Office Path3!)
Set _ OfficePath2=
Set _ OfficePath3=
If DEFINED _ Office%1Path (echo.&echo discovered 2) else (echo.&echo did not find 2)
Goto: EOF
: Licens16
For / f% x in ('dir / b..\ root\ Licenses16\ project???vl_kms*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
For / f% x in ('dir / b..\ root\ Licenses16\ proplusvl_kms*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
For / f% x in ('dir / b..\ root\ Licenses16\ standardvl_kms*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
For / f% x in ('dir / b..\ root\ Licenses16\ visio???vl_kms*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
For / f% x in ('dir / b..\ root\ Licenses16\ project???vl_mak*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
For / f% x in ('dir / b..\ root\ Licenses16\ proplusvl_mak*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
For / f% x in ('dir / b..\ root\ Licenses16\ standardvl_mak*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
For / f% x in ('dir / b..\ root\ Licenses16\ visio???vl_mak*.xrm-ms') do cscript ospp.vbs / inslic: "..\ root\ Licenses16\% x" > nul
Cscript ospp.vbs / inpkey:NYH39-6GMXT-T39D4-WVXY2-D69YY > nul
Cscript ospp.vbs / inpkey:7WHWN-4T7MP-G96JF-G33KR-W8GF4 > nul
Cscript ospp.vbs / inpkey:RBWW7-NTJD4-FFK2C-TDJ7V-4C2QP > nul
Cscript ospp.vbs / inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 > nul
Cscript ospp.vbs / inpkey:JNRGM-WHDWX-FJJG3-K47QV-DRTFM > nul
Cscript ospp.vbs / inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT > nul
Cscript ospp.vbs / inpkey:PD3PC-RHNGV-FXJ29-8JK7D-RJRJK > nul
Cscript ospp.vbs / inpkey:HFTND-W9MK4-8B7MJ-B6C4G-XQBR2 > nul
Cscript ospp.vbs / inpkey:GNFHQ-F6YQM-KQDGJ-327XX-KQBVC > nul
Cscript ospp.vbs / inpkey:GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW > nul
Cscript ospp.vbs / inpkey:9C2PK-NWTVB-JMPW8-BFT28-7FTBF > nul
Cscript ospp.vbs / inpkey:DR92N-9HTF2-97XKM-XW2WJ-XW3J6 > nul
Cscript ospp.vbs / inpkey:R69KK-NTPKF-7M3Q4-QYBHW-6MT9B > nul
Cscript ospp.vbs / inpkey:RJ7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6 > nul
Cscript ospp.vbs / inpkey:F47MM-N3XJP-TQXJ9-BP99D-8K837 > nul
Cscript ospp.vbs / inpkey:869NQ-FJ69K-466HW-QYCP2-DDBV6 > nul
Cscript ospp.vbs / inpkey:WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6 > nul
Cscript ospp.vbs / inpkey:WGT24-HCNMF-FQ7XH-6M8K7-DRTW9 > nul
Cscript ospp.vbs / inpkey:D8NRQ-JTYM3-7J2DX-646CT-6836M > nul
Cscript ospp.vbs / inpkey:69WXN-MBYV6-22PQG-3WGHK-RM6XC > nul
Cscript ospp.vbs / inpkey:NY48V-PPYYH-3F4PX-XJRKJ-W4423 > nul
Cscript ospp.vbs / inpkey:DMTCJ-KNRKX-26982-JYCKT-P7KB6 > nul
Goto: EOF
Exit
: xptooff
Echo is currently WinXP or Win2003.
Call: GetOfficePath 14 Office2010
Call: ActOffice 14 Office2010
: fail
Cls
Echo.
Echo cannot connect to the server, please edit the script to replace the KMS server, or use another activation tool.
Pause
Exit
Thank you for reading! On "how to achieve KMS automatic activation of windows, office script," this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.