Skip to content

Instantly share code, notes, and snippets.

@lucmsilva651
Created June 24, 2023 20:30
Show Gist options
  • Save lucmsilva651/256b2cbe9924c6e037cae622dc5fc2a7 to your computer and use it in GitHub Desktop.
Save lucmsilva651/256b2cbe9924c6e037cae622dc5fc2a7 to your computer and use it in GitHub Desktop.
Activate your copy of Win10Lite
@echo off
:: Source: https://medium.com/wireless-bidet/how-to-activate-windows-10-using-command-prompt-9c5d248f3420
:: The Win10Lite Team condemns piracy in all forms. Only run this script if you know what it does.
:: BatchGotAdmin below
:-------------------------------------
title Administrator rights required
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params= %*
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
title Win10Lite Activation Service
echo Source: https://medium.com/wireless-bidet/how-to-activate-windows-10-using-command-prompt-9c5d248f3420
echo The Win10Lite Team condemns piracy in all forms. Only run this script if you know what it does.
echo Please close all applications before running the script.
timeout /t 10 /nobreak
slmgr /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
slmgr /skms kms8.msguides.com
slmgr /ato
cls
echo Restarting now...
shutdown /r /t 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment