Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0""", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
- color 1F
- title W10 LTSB 2015 Digital License Activation Script 1
- setlocal enabledelayedexpansion
- setlocal EnableExtensions
- pushd "%~dp0"
- cd /d "%~dp0"
- ::===========================================================
- :MAINMENU
- cls
- FOR /F "TOKENS=2 DELIMS==" %%A IN ('"WMIC PATH SoftwareLicensingProduct WHERE (Name LIKE 'Windows%%' AND PartialProductKey is not NULL) GET LicenseFamily /VALUE"') DO IF NOT ERRORLEVEL 1 SET "osedition=%%A"
- IF NOT DEFINED osedition (
- cls
- FOR /F "TOKENS=3 DELIMS=: " %%A IN ('DISM /English /Online /Get-CurrentEdition 2^>nul ^| FIND /I "Current Edition :"') DO SET "osedition=%%A"
- )
- for /f "tokens=2 delims==" %%a IN ('"wmic Path Win32_OperatingSystem Get Version /format:LIST"')do (set Version=%%a) >nul 2>&1
- cls
- echo. _________________________________________________________
- echo.
- echo Windows 10 %osedition% LTSB 2015 %Version%
- echo. _________________________________________________________
- echo. ^| by 3rror_403 ^|
- Echo. ^| [1] Activate W10 LTSB 2015 with Digital License ^|
- Echo. ^| ^|
- Echo. ^| [2] Check Windows Activation Status ^|
- Echo. ^| ^|
- Echo. ^| [3] -Read Me- ^|
- Echo. ^| ^|
- echo. ^| + Advance Options + ^|
- echo. ^| ^|
- Echo. ^| [4] Insert The Product Key ^|
- Echo. ^| ^|
- Echo. ^| [5] Extract $OEM$ Folder To Desktop ^|
- Echo. ^| _______________ ^|
- echo. ^| ^|
- Echo. ^| [6] Check For Script Updates ^|
- Echo. ^| ^|
- Echo. ^| [7] Exit ^|
- Echo. ^|_________________________________________________________^|
- ECHO.
- choice /C:1234567 /N /M ". Enter Your Choice [1,2,3,4,5,6,7] : "
- if errorlevel 7 goto:Exit
- if errorlevel 6 goto:CheckForUpdates
- if errorlevel 5 goto:Extract
- if errorlevel 4 goto:InsertProductKey
- if errorlevel 3 goto:ReadMe
- if errorlevel 2 goto:Check
- if errorlevel 1 goto:HWIDActivate
- ::===========================================================
- :key
- rem Edition Key SKU EditionId
- (
- echo EnterpriseS FWN7H-PF93Q-4GGP8-M8RF3-MDWWW 125 X19-99617
- echo EnterpriseSN 8V8WN-3GXBH-2TCMG-XHRX3-9766K 126 X19-98770
- ) > "%temp%\editions"
- goto:eof
- ::===========================================================
- :HWIDActivate
- CLS
- wmic path SoftwareLicensingProduct where (LicenseStatus='1' and GracePeriodRemaining='0' and PartialProductKey is not NULL) get Name 2>nul | findstr /i "Windows" 1>nul && (
- echo.
- echo ==================================================================
- echo Checking: Windows 10 %osedition% is Permanently Activated.
- echo Activation is not required.
- echo ==================================================================
- echo.
- echo Press any key to continue...
- pause >nul
- goto:MainMenu
- )
- ::===========================================================
- cls
- echo Windows 10 %osedition% Digital License Activation
- call:key
- for /f "tokens=1-4 usebackq" %%a in ("%temp%\editions") do (if ^[%%a^]==^[%osedition%^] (
- set edition=%%a
- set key=%%b
- set sku=%%c
- set editionId=%%d
- goto:parseAndPatch))
- echo:
- echo %osedition% Digital License Activation is Not Supported.
- echo:
- echo Press any key to continue...
- del /f "%temp%\editions"
- pause >nul
- goto:MainMenu
- ::===========================================================
- :parseAndPatch
- cls
- echo =================================================================================================
- echo Windows 10 %osedition% Digital License Activation
- echo +++ Note - For Successful Activation, The Windows Update Service and Internet Must be Enabled +++
- echo =================================================================================================
- echo.
- echo Installing Default product key for Windows 10 %osedition% ...
- cscript /nologo %windir%\system32\slmgr.vbs -ipk %key%
- wmic path SoftwareLicensingProduct where (LicenseStatus='1' and GracePeriodRemaining='0' and PartialProductKey is not NULL) get Name 2>nul | findstr /i "Windows" 1>nul && (
- echo.
- echo ==================================================================
- echo Checking: Windows 10 %osedition% is Permanently Activated.
- echo Activation is not required.
- echo ==================================================================
- echo.
- echo Press any key to continue...
- del /f "%temp%\editions"
- pause >nul
- goto:MainMenu
- )
- ::===========================================================
- cd /d "%~dp0"
- set "gatherosstate=bin\gatherosstate.exe"
- echo Creating registry entries...
- reg add "HKLM\SYSTEM\Tokens" /v "Channel" /t REG_SZ /d "Retail" /f
- reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Kernel-ProductInfo" /t REG_DWORD /d %sku% /f
- reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Security-SPP-GenuineLocalStatus" /t REG_DWORD /d 1 /f
- echo Creating GenuineTicket.XML file for Windows 10 %osedition% ...
- start /wait "" "%gatherosstate%"
- timeout /t 3 >nul 2>&1
- echo GenuineTicket.XML file is installing for Windows 10 %osedition% ...
- clipup -v -o -altto bin\
- echo ===================================================================================
- cscript /nologo %windir%\system32\slmgr.vbs -ato
- echo ===================================================================================
- echo Deleting registry entries...
- reg delete "HKLM\SYSTEM\Tokens" /f
- del /f "%temp%\editions"
- echo:
- echo Press any key to continue...
- pause >nul
- goto:MainMenu
- ::===========================================================
- :Check
- CLS
- echo ======================================================================
- echo.
- cscript //nologo %systemroot%\System32\slmgr.vbs /dli
- cscript //nologo %systemroot%\System32\slmgr.vbs /xpr
- echo.
- echo ======================================================================
- echo.
- echo Press any key to continue...
- pause >nul
- goto:MainMenu
- ::===========================================================
- :ReadMe
- CLS
- cd /d "%~dp0"
- type ReadMe.txt
- echo.
- echo.
- echo Press any key to continue...
- pause >nul
- goto:MAINMENU
- ::===========================================================
- :InsertProductKey
- CLS
- echo:
- call:key
- for /f "tokens=1-4 usebackq" %%a in ("%temp%\editions") do (if ^[%%a^]==^[%osedition%^] (
- set edition=%%a
- set key=%%b
- set sku=%%c
- set editionId=%%d
- goto :Insertkey))
- echo %osedition% Digital License Activation is Not Supported.
- echo Press any key to continue...
- del /f "%temp%\editions"
- pause >nul
- goto:MainMenu
- :Insertkey
- CLS
- echo:
- echo =============================================================
- echo Installing the Product key for Windows 10 %osedition%
- echo =============================================================
- echo:
- cscript /nologo %windir%\system32\slmgr.vbs -ipk %key%
- echo:
- echo Press any key to continue...
- del /f "%temp%\editions"
- pause >nul
- goto:MAINMENU
- ::===========================================================
- :Extract
- cls
- cd /d "%userprofile%\desktop\"
- IF EXIST $OEM$ (
- echo.
- echo.
- echo ===============================================
- echo $OEM$ folder already exists on Desktop.
- echo ===============================================
- echo.
- echo Press any key to continue...
- pause >nul
- goto:MAINMENU
- ) ELSE (
- md $OEM$\$$\Setup\Scripts\BIN
- cd /d "%~dp0"
- copy BIN\gatherosstate.exe "%userprofile%\desktop\$OEM$\$$\Setup\Scripts\BIN"
- copy BIN\slc.dll "%userprofile%\desktop\$OEM$\$$\Setup\Scripts\BIN"
- )
- cd /d "%userprofile%\desktop\$OEM$\$$\Setup\Scripts\"
- (
- echo @Echo off
- echo pushd "%%~dp0"
- echo cd /d "%%~dp0"
- echo ::===========================================================================
- echo rem Edition Key SKU EditionId
- echo ^(
- echo echo EnterpriseS FWN7H-PF93Q-4GGP8-M8RF3-MDWWW 125 X19-99617
- echo echo EnterpriseSN 8V8WN-3GXBH-2TCMG-XHRX3-9766K 126 X19-98770
- echo ^) ^> "%%temp%%\editions"
- echo ::===========================================================================
- echo FOR /F "TOKENS=2 DELIMS==" %%%%A IN ^('"WMIC PATH SoftwareLicensingProduct WHERE (Name LIKE 'Windows%%%%' AND PartialProductKey is not NULL) GET LicenseFamily /VALUE"'^) DO IF NOT ERRORLEVEL 1 SET "osedition=%%%%A"
- echo for /f "tokens=1-4 usebackq" %%%%a in ^("%%temp%%\editions"^) do ^(if ^^[%%%%a^^]==^^[%%osedition%%^^] ^(
- echo set edition=%%%%a
- echo set key=%%%%b
- echo set sku=%%%%c
- echo set editionId=%%%%d
- echo goto :parseAndPatch^)^)
- echo echo %%osedition%% Digital License Activation is Not Supported.
- echo del /f "%%temp%%\editions"
- echo exit
- echo ::===========================================================================
- echo :parseAndPatch
- echo cd /d "%%~dp0"
- echo set "gatherosstate=bin\gatherosstate.exe"
- echo cscript /nologo %%windir%%\system32\slmgr.vbs -ipk %%key%%
- echo reg add "HKLM\SYSTEM\Tokens" /v "Channel" /t REG_SZ /d "Retail" /f
- echo reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Kernel-ProductInfo" /t REG_DWORD /d %%sku%% /f
- echo reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Security-SPP-GenuineLocalStatus" /t REG_DWORD /d 1 /f
- echo start /wait "" "%%gatherosstate%%"
- echo timeout /t 3 ^>nul 2^>^&1
- echo clipup -v -o -altto bin\
- echo cscript /nologo %%windir%%\system32\slmgr.vbs -ato
- echo reg delete "HKLM\SYSTEM\Tokens" /f
- echo del /f "%%temp%%\editions"
- echo cd %%~dp0
- echo rmdir /s /q "%%windir%%\setup\scripts" ^>nul 2^>^&1
- echo exit
- echo ::===========================================================================
- )^> SetupComplete.cmd
- cls
- echo.
- echo.
- echo ====================================================
- echo $OEM$ folder is successfully created on the Desktop.
- echo ====================================================
- echo Press any key to continue...
- pause >nul
- goto:MAINMENU
- ::===========================================================
- :CheckForUpdates
- start https://www.nsaneforums.com/topic/316668-w10-digital-license-activation-script/
- goto:MAINMENU
- ::===========================================================
- :Exit
- exit
- ::===========================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement