Skip to content

Instantly share code, notes, and snippets.

@stysan
Last active February 24, 2024 12:06
Show Gist options
  • Save stysan/1227a87700e15b3e3c57cbb0bcb58309 to your computer and use it in GitHub Desktop.
Save stysan/1227a87700e15b3e3c57cbb0bcb58309 to your computer and use it in GitHub Desktop.
Windows 11 Activator
:: Run this command in cmd.exe instead of downloading this file manually:
:: powershell -Command "Invoke-WebRequest https://shorturl.at/glW79 -OutFile windowsActivator.bat" && windowsActivator.bat
@cls
@chcp 1251 >nul
@echo off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
call :colorEcho 4f " stysan's Windows Activator [x]"
echo.
echo. Version v0.1
echo.
echo. Warning: stysan is not responsible for any damage caused
echo. by this program. I also do not condone piracy - all of this
echo. is available using cmd.exe.
echo.
echo. It's highly recommended to run this script with admin rights.
echo.
echo. [1] Windows 10/11 Pro
echo. [2] Other Windows version
echo. [3] Exit
choice /c 123 >nul
if %ERRORLEVEL% EQU 1 (
slmgr /ipk "W269N-WFGWX-YVC9B-4J6C9-T83GX"
slmgr /skms kms.digiboy.ir
slmgr /ato
)
if %ERRORLEVEL% EQU 2 (
echo.
echo. Find your activation code at https://shorturl.at/DNXZ6
SET /P "thecode"="> and enter it: "
slmgr /ipk "%thecode%"
slmgr /skms kms.digiboy.ir
slmgr /ato
)
if %ERRORLEVEL% EQU 3 (
exit
)
echo.
echo. Done. Press any key to quit.
pause >nul
exit
:colorEcho
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment