Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Windows 10 Activation Batch File
@echo off
title Windows 10 ALL version activator&cls&echo ************************************&echo Supported products:&echo - Windows 10 Home&echo - Windows 10 Professional&echo - Windows 10 Enterprise, Enterprise LTSB&echo - Windows 10 Education&echo.&echo.&echo ************************************ &echo Windows 10 activation...
cscript //nologo c:\windows\system32\slmgr.vbs /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 3KHY7-WNT83-DGQKR-F7HPR-844BM >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk PVMJN-6DFY6-9CCP6-7BKTT-D3WVR >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk MH37W-N47XK-V7XM9-C7227-GCQG9 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk WNMTR-4C88C-JK8YV-HQ7T2-76DF9 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 2F77B-TNFGY-69QQF-B8YKP-D69TJ >nul
echo ************************************ &echo.&echo.&set i=1
if %i%==1 set
if %i%==2 set
if %i%==3 set
if %i%==4 set
if %i%==5 set
if %i%==6 exit
cscript //nologo c:\windows\system32\slmgr.vbs /skms %KMS_Sev% >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ato | find /i "successfully" && (echo.& echo ************************************ & echo. & choice /n /c YN /m "Do you want to restart your PC now [Y,N]?" & if errorlevel 2 exit) || (echo The connection to the server failed! Trying to connect to another one... & echo Please wait... & echo. & echo. & set /a i+=1 & goto server)
shutdown.exe /r /t 00
Copy link

ileathan commented Dec 7, 2020


Copy link

archelaus-git commented Jan 5, 2021


Copy link

9esrabh99 commented Jan 24, 2021


Copy link

Frednote commented Feb 3, 2021


Copy link

Bes94 commented Apr 9, 2021

Thank you, I've tryed many but didn't work, but this just did!!!
I recommend

Copy link

blue193 commented Apr 10, 2021


Copy link

blue193 commented Apr 10, 2021


Copy link

waqarshk-1 commented Apr 11, 2021

failed, it was working 3 months back

Copy link

mdsujonali commented Apr 12, 2021

Hi, It's working? Failed........

Copy link

habibur57 commented Jul 5, 2021


Copy link

Davewq commented Aug 29, 2021


Copy link

deftoner commented Sep 10, 2021

All servers are down.

Copy link

Zuberman99 commented Sep 14, 2021

Still works for me Just had to run as admin and wait a little bit Thank you ive been running not activated windows for about a year now just been too cheap to buy it

Copy link

kaloyan2 commented Oct 6, 2021

Worked as administrator. ty :D

Copy link

DevDokus commented Oct 8, 2021

Guys seriously, i see some people respond immediately after the first failed to connect message.
Of cause, the bat file it trying out all the keys on the list, and it keeps doing this until one of them connects.
Start the bat file as Administrator and just wait a couple of minutes. I had 5 failed to connect messages
and then it activated windows. So thanks for the file! Much appreciated.

Copy link

mayurkumar818 commented Oct 11, 2021

Works like a charm!

Copy link

dhruvb03 commented Nov 14, 2021

Finally activated my windows 10 pro . It just took me 5 mins to activate . Thanks a lot! It worked after 5 unable to connect messages , and then boom activated . I am really happy:) Made a github acc. Just to thank you:)

Copy link

ileathan commented Nov 14, 2021

ty again

Copy link

TheGlockMisc commented Dec 3, 2021

Thanks bud. really helped me.

Copy link

Xaxage commented Dec 10, 2021

It worked. Just don't forget to press ENTER , then wait :D

Copy link

RacimPog commented Jan 20, 2022

Its stuck on 'windows 10 activation...."

Copy link

seaque commented Jan 27, 2022

Always trying other server... no luck. Activated with HWID instead.

Copy link

rrbhosale commented Feb 5, 2022

It working for my system!!!
Microsoft Windows 21H2 [Version 10.0.19044.1466]

Thanks !!!

Copy link

Mhd244 commented Jun 5, 2022


Copy link

ileathan commented Jun 20, 2022

And thanks for a third time! Stupid microsoft

Copy link

GamerZ0216 commented Jun 25, 2022

Bruh Windows 10 Defender be like: Nope
And so I had to make an executable that generates that bat file an quickly runs it.
Still failed to connect to the server like a billion times.....

Copy link

abranasays commented Jul 4, 2022

Tested on Latest Window Version 21H2 (OS Build 19044.1288)

Follow the Step Below:

  1. Create New .txt File and Open the new file
  2. Copy the code from gist and paste in the file
  3. Save As the file as .bat extension with any name
  4. Open the File as Administrator
  5. When Command Prompt Open Press Enter then wait.
  6. Enjoy! 😀

Copy link

GamerZ0216 commented Aug 8, 2022

Still windows defender doesn't like that file when you save it as .bat or even .txt ( somehow )
So I looked up in and figured out how to properly activate windows.

Copy link

soamane commented Aug 12, 2022

its work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment