Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Windows+office Activation script Update

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

@ echo off&setlocal EnableDelayedExpansion&color 5e

Title KMS_Activation for Windows ALL-(Comlan)

: WH

Cls

Echo.

Echo Select the version of Windows that needs to be activated----COMLAN

Echo.

Echo

Echo 1. Windows 10 ALL

Echo.

Echo 2. Windows 8.1 ALL

Echo.

Echo 3. Windows 8 ALL

Echo.

Echo 4. Windows 7 ALL

Echo.

Echo 5. Windows Server 2012 ALL

Echo.

Echo 6. Windows Server 2012 R2 ALL

Echo.

Echo 7. Windows Server 2016 ALL

Echo.

Echo 8. Windows Server 2008 R2 ALL

Echo.

Echo 9. Windows Server 2019 ALL

Echo.

Echo 10. Office 2016 ALL

Echo.

Echo 11. Office 2013 ALL

Echo.

Echo 12. Office 2010 ALL

Echo.

Echo 13. Office 2019 ALL

Echo.

Set / p tsk= "Please enter the version number of the Windows you want to activate (Enter) Confirm (1-8):"

If not defined tsk goto:err

If tsk%==1 goto:1

If tsk%==2 goto:2

If tsk%==3 goto:3

If tsk%==4 goto:4

If tsk%==5 goto:5

If tsk%==6 goto:6

If tsk%==7 goto:7

If tsk%==8 goto:8

If tsk%==9 goto:9

If tsk%==10 goto:10

If tsk%==11 goto:11

If tsk%==12 goto:12

If tsk%==13 goto:13

: err

Goto:WH

: 1

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

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 Professional=W269N-WFGWX-YVC9B-4J6C9-T83GX

Set ProfessionalN=MH37W-N47XK-V7XM9-C7227-GCQG9

Set Enterprise=NPPR9-FWDCX-D2C8J-H872K-2YT43

Set EnterpriseN=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4

Set Education=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2

Set EducationN=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ

Set EnterpriseS=WNMTR-4C88C-JK8YV-HQ7T2-76DF9

Set EnterpriseSN=2F77B-TNFGY-69QQF-B8YKP-D69TJ

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "10.0." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 10.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 2

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: adminchk

Set Professional=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4

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-H9DH4J

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 3

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

Set Professional=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9

Set ProfessionalN=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY

Set Enterprise=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7

Set EnterpriseN=TT4HM-HN7YT-62K67-RGRQJ-JFFXW

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "8.1." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 8.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 4

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

Set Professional=NG4HW-VH26C-733KW-K6F98-J8CK4

Set ProfessionalN=XCVCF-2NXM9-723PB-MHCB7-2RYQQ

Set Enterprise=32JNW-9KQ84-P47T8-D8GGY-CWCK7

Set EnterpriseN=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "8.0." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 8.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 5

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

Set ServerDatacenter=48HP8-DN98B-MYWDG-T2DCC-8W83P

Set ServerStandard=XC9B7-NBPP2-83J2H-RHMBY-92BT4

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "10.0." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 10.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 6

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

Set ServerDatacenter=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9

Set ServerStandard=D2N9P-3P6X9-2R39C-7RTCD-MDVJX

Set ServerEnterprise=KNC87-3J2TX-XB4WP-VCPJV-M4FWM

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "10.0." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 10.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 7

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

Set ServerDatacenter=CB7KF-BWN84-R7R2Y-793K2-8XDDG

Set ServerStandard=WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY

Set ServerEnterprise=JCKRF-N37P4-C2D82-9YXRT-4M63B

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "10.0." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 10.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 8

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

Set ServerDatacenter=74YFP-3QFB3-KQT8W-PMXWJ-7M648

Set ServerStandard=YC6KT-GKW9T-YTKYR-T4X34-R7VHC

Set ServerEnterprise=489J6-VHDMP-X63PK-3K798-CPX3Y

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "10.0." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 10.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 9

Cls

Set KMS_Sev=kms.comlan.com

:: = = The following content does not need to change = =

Call: verchk

Call: adminchk

Set ServerDatacenter=WMDGN-G9PQG-XVVXX-R3X43-63DFG

Set ServerStandard=N69G4-B89J2-4G8F4-WWYCC-J464C

Set ServerEnterprise=WVDHN-86M7X-466P6-VHXV7-YY726

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% KMS_Sev%

Cscript / / Nologo% windir%\ system32\ slmgr.vbs / ato

) else (

Echo.&echo Not found DEFINED Key: "% EditionID%".

Echo.

)

Pause

Exit

: verchk

Ver | find "10.0." > nul 2 > nul & & (goto: EOF)

Echo.&echo The current OS is NOT Windows 10.

Echo.&pause

Exit

: adminchk

Reg query "HKU\ S Mel 1-5-19" > nul 2 > nul | | (

Cls&echo.&echo Run as ADMINISTRATOR, Pls.

Echo.&echo Press any key to exit.

Echo.&pause > nul

Exit)

Goto: EOF

: 10

Cls

Set BatPath=%~dp0

Set BatPath=%BatPath:~0,-1%

For / f "tokens=6 delims= [].% G in ('ver') do set win=%%G

Rem Judging 32/64 bit

Set "ospp=%ProgramFiles%\ Microsoft Office\ Office16\ ospp.vbs"

If not exist "% ospp%"

Set "ospp=%ProgramFiles (x86)%\ Microsoft Office\ Office16\ ospp.vbs"

)

: Setting variables==

Set ip=kms.comlan.com

: Start the KMS server==

: kms.comlan.com

If errorlevel% EQU 0 (

Echo Connect the KMS server:%ip% success!

Echo.

) else (goto: kms.comlan.com)

: Start activation==

ECHO.Office Is activating...

:: Uninstall the installed product key. The following number is the last 5 digits of the key.

:: 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%" / inpkey:JNRGM-WHDWX-FJJG3-K47QV-DRTFM > nul

Cscript "ospp%" / inpkey:7WHWN-4T7MP-G96JF-G33KR-W8GF4 > nul

Cscript "ospp%" / inpkey:GNFHQ-F6YQM-KQDGJ-327XX-KQBVC > nul

Cscript "ospp%" / sethst:%ip% > nul

Cscript "% ospp%" / act

Pause

: dstatus

Cls

Echo Office Active state...

Cscript "% ospp%" / dstatus

Pause

Goto: EFO

: 11

Cls

Set BatPath=%~dp0

Set BatPath=%BatPath:~0,-1%

For / f "tokens=6 delims= [].% G in ('ver') do set win=%%G

Rem Judging 32/64 bit

Set "ospp=%ProgramFiles%\ Microsoft Office\ Office15\ ospp.vbs"

If not exist "% ospp%"

Set "ospp=%ProgramFiles (x86)%\ Microsoft Office\ Office15\ ospp.vbs"

)

: Setting variables==

Set ip=kms.comlan.com

: Start the KMS server==

: kms.comlan.com

If errorlevel% EQU 0 (

Echo Connect the KMS server:%ip% success!

Echo.

) else (goto: kms.comlan.com)

: Start activation==

ECHO.Office Is activating...

:: Uninstall the installed product key. The following number is the last 5 digits of the key.

:: cscript ospp.vbs / unpkey:xxxxx

:: Office Professional Plus Key

:: Visio Professional Key

:: Project Professional Key

Cscript "ospp%" / inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT > nul

Cscript "ospp%" / inpkey:C2FG9-N6J68-H8BTJ-BW3QX-RM3B3 > nul

Cscript "ospp%" / inpkey:FN8TT-7WMH6-2D4X9-M337T-2342K > nul

Cscript "ospp%" / inpkey:KBKQT-2NMXY-JJWGP-M62JB-92CD4 > nul

Cscript "ospp%" / inpkey:J484Y-4NKBF-W2HMG-DBMJC-PGWR7 > nul

Cscript "ospp%" / inpkey:6NTH3-CW976-3G3Y2-JK3TX-8QHTT > nul

Cscript "ospp%" / sethst:%ip% > nul

Cscript "% ospp%" / act

Pause

: dstatus

Cls

Echo Office Active state...

Cscript "% ospp%" / dstatus

Pause

Goto: EFO

: 12

Cls

Set BatPath=%~dp0

Set BatPath=%BatPath:~0,-1%

For / f "tokens=6 delims= [].% G in ('ver') do set win=%%G

Rem Judging 32/64 bit

Set "ospp=%ProgramFiles%\ Microsoft Office\ Office15\ ospp.vbs"

If not exist "% ospp%"

Set "ospp=%ProgramFiles (x86)%\ Microsoft Office\ Office15\ ospp.vbs"

)

: Setting variables==

Set ip=kms.comlan.com

: Start the KMS server==

: kms.comlan.com

If errorlevel% EQU 0 (

Echo Connect the KMS server:%ip% success!

Echo.

) else (goto: kms.comlan.com)

: Start activation==

ECHO.Office Is activating...

:: Uninstall the installed product key. The following number is the last 5 digits of the key.

:: cscript ospp.vbs / unpkey:xxxxx

:: Office Professional Plus Key

:: Office 2013 Standard Key

:: Visio Professional Key

:: Project Professional Key

Cscript "ospp%" / inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB > nul

Cscript "ospp%" / inpkey:7MCW8-VRQVK-G677T-PDJCM-Q8TCP > nul

Cscript "ospp%" / inpkey:YGX6F-PGV49-PGW3J-9BTGG-VHKC6 > nul

Cscript "ospp%" / inpkey:V7QKV-4XVVR-XYV4D-F7DFM-8R6BM > nul

Cscript "ospp%" / inpkey:767HD-QGMWX-8QTDB-9G3R2-KHFGJ > nul

Cscript "ospp%" / inpkey:4HP3K-88W3F-W2K3D-6677X-F9PGB > nul

Cscript "ospp%" / sethst:%ip% > nul

Cscript "% ospp%" / act

Pause

: dstatus

Cls

Echo Office Active state...

Cscript "% ospp%" / dstatus

Pause

Goto: EFO

: 13

Cls

Set BatPath=%~dp0

Set BatPath=%BatPath:~0,-1%

For / f "tokens=6 delims= [].% G in ('ver') do set win=%%G

Rem Judging 32/64 bit

Set "ospp=%ProgramFiles%\ Microsoft Office\ Office16\ ospp.vbs"

If not exist "% ospp%"

Set "ospp=%ProgramFiles (x86)%\ Microsoft Office\ Office16\ ospp.vbs"

)

: Setting variables==

Set ip=kms.comlan.com

: Start the KMS server==

: kms.comlan.com

If errorlevel% EQU 0 (

Echo Connect the KMS server:%ip% success!

Echo.

) else (goto: kms.comlan.com)

: Start activation==

ECHO.Office Is activating...

:: Uninstall the installed product key. The following number is the last 5 digits of the key.

:: cscript ospp.vbs / unpkey:xxxxx

:: Office Professional Plus Key

:: Visio Professional Key

:: Project Professional Key

Cscript "ospp%" / inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP > nul

Cscript "% ospp%" / inpkey:9BGNQ-K37YR-RQHF2-38RQ3-7VCBB > nul

Cscript "ospp%" / inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B > nul

Cscript "ospp%" / inpkey:6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK > nul

Cscript "ospp%" / inpkey:7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2 > nul

Cscript "ospp%" / inpkey:C4F7P-NCP8C-6CQPT-MQHV9-JXD2M > nul

Cscript "ospp%" / sethst:%ip% > nul

Cscript "% ospp%" / act

Pause

: dstatus

Cls

Echo Office Active state...

Cscript "% ospp%" / dstatus

Pause

Goto: EFO

: EOF

Echo.

Echo Activation was successful. Please press any key to exit!

Pause > nul

Exit

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report