Advertisement
Guest User

W10 LTSB 2015 Digital License Activation Script 1

a guest
Dec 10th, 2018
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 11.52 KB | None | 0 0
  1. @echo off
  2. 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 )
  3. color 1F
  4. title W10 LTSB 2015 Digital License Activation Script 1
  5. setlocal enabledelayedexpansion
  6. setlocal EnableExtensions
  7. pushd "%~dp0"
  8. cd /d "%~dp0"
  9. ::===========================================================
  10. :MAINMENU
  11. cls
  12. 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"
  13. IF NOT DEFINED osedition (
  14. cls
  15. FOR /F "TOKENS=3 DELIMS=: " %%A IN ('DISM /English /Online /Get-CurrentEdition 2^>nul ^| FIND /I "Current Edition :"') DO SET "osedition=%%A"
  16. )
  17. for /f "tokens=2 delims==" %%a IN ('"wmic Path Win32_OperatingSystem Get Version /format:LIST"')do (set Version=%%a) >nul 2>&1
  18. cls
  19. echo.                              _________________________________________________________
  20. echo.
  21. echo                                 Windows 10 %osedition% LTSB 2015 %Version%                      
  22. echo.                              _________________________________________________________
  23. echo.                             ^|                   by 3rror_403                            ^|
  24. Echo.                             ^|   [1] Activate W10 LTSB 2015 with Digital License       ^|
  25. Echo.                             ^|                                                         ^|
  26. Echo.                             ^|   [2] Check Windows Activation Status                   ^|  
  27. Echo.                             ^|                                                         ^|
  28. Echo.                             ^|   [3] -Read Me-                                         ^|
  29. Echo.                             ^|                                                         ^|    
  30. echo.                             ^|                 + Advance Options +                     ^|
  31. echo.                             ^|                                                         ^|
  32. Echo.                             ^|   [4] Insert The Product Key                            ^|
  33. Echo.                             ^|                                                         ^|
  34. Echo.                             ^|   [5] Extract $OEM$ Folder To Desktop                   ^|
  35. Echo.                             ^|                   _______________                       ^|
  36. echo.                             ^|                                                         ^|  
  37. Echo.                             ^|   [6] Check For Script Updates                          ^|
  38. Echo.                             ^|                                                         ^|
  39. Echo.                             ^|   [7] Exit                                              ^|
  40. Echo.                             ^|_________________________________________________________^|
  41. ECHO.
  42. choice /C:1234567 /N /M ".                            Enter Your Choice [1,2,3,4,5,6,7] : "
  43. if errorlevel 7 goto:Exit
  44. if errorlevel 6 goto:CheckForUpdates
  45. if errorlevel 5 goto:Extract
  46. if errorlevel 4 goto:InsertProductKey
  47. if errorlevel 3 goto:ReadMe
  48. if errorlevel 2 goto:Check
  49. if errorlevel 1 goto:HWIDActivate
  50. ::===========================================================
  51. :key
  52. rem              Edition                          Key              SKU EditionId
  53. (
  54. echo EnterpriseS                    FWN7H-PF93Q-4GGP8-M8RF3-MDWWW 125 X19-99617
  55. echo EnterpriseSN                   8V8WN-3GXBH-2TCMG-XHRX3-9766K 126 X19-98770
  56. ) > "%temp%\editions"
  57. goto:eof
  58. ::===========================================================
  59. :HWIDActivate
  60. CLS
  61. wmic path SoftwareLicensingProduct where (LicenseStatus='1' and GracePeriodRemaining='0' and PartialProductKey is not NULL) get Name 2>nul | findstr /i "Windows" 1>nul && (
  62. echo.
  63. echo ==================================================================
  64. echo Checking: Windows 10 %osedition% is Permanently Activated.
  65. echo Activation is not required.
  66. echo ==================================================================
  67. echo.
  68. echo Press any key to continue...
  69. pause >nul
  70. goto:MainMenu
  71. )
  72. ::===========================================================
  73. cls
  74. echo Windows 10 %osedition% Digital License Activation
  75. call:key
  76. for /f "tokens=1-4 usebackq" %%a in ("%temp%\editions") do (if ^[%%a^]==^[%osedition%^] (
  77.     set edition=%%a
  78.     set key=%%b
  79.     set sku=%%c
  80.     set editionId=%%d
  81.     goto:parseAndPatch))
  82. echo:
  83. echo %osedition% Digital License Activation is Not Supported.
  84. echo:
  85. echo Press any key to continue...
  86. del /f "%temp%\editions"
  87. pause >nul
  88. goto:MainMenu
  89. ::===========================================================
  90. :parseAndPatch
  91. cls
  92. echo              =================================================================================================
  93. echo                                 Windows 10 %osedition% Digital License Activation
  94. echo              +++ Note - For Successful Activation, The Windows Update Service and Internet Must be Enabled +++
  95. echo              =================================================================================================
  96. echo.
  97. echo Installing Default product key for Windows 10 %osedition% ...
  98. cscript /nologo %windir%\system32\slmgr.vbs -ipk %key%
  99. wmic path SoftwareLicensingProduct where (LicenseStatus='1' and GracePeriodRemaining='0' and PartialProductKey is not NULL) get Name 2>nul | findstr /i "Windows" 1>nul && (
  100. echo.
  101. echo ==================================================================
  102. echo Checking: Windows 10 %osedition% is Permanently Activated.
  103. echo Activation is not required.
  104. echo ==================================================================
  105. echo.
  106. echo Press any key to continue...
  107. del /f "%temp%\editions"
  108. pause >nul
  109. goto:MainMenu
  110. )
  111. ::===========================================================
  112. cd /d "%~dp0"
  113. set "gatherosstate=bin\gatherosstate.exe"
  114. echo Creating registry entries...
  115. reg add "HKLM\SYSTEM\Tokens" /v "Channel" /t REG_SZ /d "Retail" /f
  116. reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Kernel-ProductInfo" /t REG_DWORD /d %sku% /f
  117. reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Security-SPP-GenuineLocalStatus" /t REG_DWORD /d 1 /f
  118. echo Creating GenuineTicket.XML file for Windows 10 %osedition% ...
  119. start /wait "" "%gatherosstate%"
  120. timeout /t 3 >nul 2>&1
  121. echo GenuineTicket.XML file is installing for Windows 10 %osedition% ...
  122. clipup -v -o -altto bin\
  123. echo ===================================================================================
  124. cscript /nologo %windir%\system32\slmgr.vbs -ato
  125. echo ===================================================================================
  126. echo Deleting registry entries...
  127. reg delete "HKLM\SYSTEM\Tokens" /f
  128. del /f "%temp%\editions"
  129. echo:
  130. echo Press any key to continue...
  131. pause >nul
  132. goto:MainMenu
  133. ::===========================================================
  134. :Check
  135. CLS
  136. echo ======================================================================
  137. echo.
  138. cscript //nologo %systemroot%\System32\slmgr.vbs /dli
  139. cscript //nologo %systemroot%\System32\slmgr.vbs /xpr
  140. echo.
  141. echo ======================================================================
  142. echo.
  143. echo Press any key to continue...
  144. pause >nul
  145. goto:MainMenu
  146. ::===========================================================
  147. :ReadMe
  148. CLS
  149. cd /d "%~dp0"
  150. type ReadMe.txt
  151. echo.
  152. echo.
  153. echo Press any key to continue...
  154. pause >nul
  155. goto:MAINMENU
  156. ::===========================================================
  157. :InsertProductKey
  158. CLS
  159. echo:
  160. call:key
  161. for /f "tokens=1-4 usebackq" %%a in ("%temp%\editions") do (if ^[%%a^]==^[%osedition%^] (
  162.     set edition=%%a
  163.     set key=%%b
  164.     set sku=%%c
  165.     set editionId=%%d
  166.     goto :Insertkey))
  167. echo %osedition% Digital License Activation is Not Supported.
  168. echo Press any key to continue...
  169. del /f "%temp%\editions"
  170. pause >nul
  171. goto:MainMenu
  172. :Insertkey
  173. CLS
  174. echo:
  175. echo =============================================================
  176. echo Installing the Product key for Windows 10 %osedition%
  177. echo =============================================================
  178. echo:
  179. cscript /nologo %windir%\system32\slmgr.vbs -ipk %key%
  180. echo:
  181. echo Press any key to continue...
  182. del /f "%temp%\editions"
  183. pause >nul
  184. goto:MAINMENU
  185. ::===========================================================
  186. :Extract
  187. cls
  188. cd /d "%userprofile%\desktop\"
  189. IF EXIST $OEM$ (
  190. echo.
  191. echo.
  192. echo ===============================================
  193. echo $OEM$ folder already exists on Desktop.
  194. echo ===============================================
  195. echo.
  196. echo Press any key to continue...
  197. pause >nul
  198. goto:MAINMENU
  199. ) ELSE (
  200. md $OEM$\$$\Setup\Scripts\BIN
  201. cd /d "%~dp0"
  202. copy BIN\gatherosstate.exe "%userprofile%\desktop\$OEM$\$$\Setup\Scripts\BIN"
  203. copy BIN\slc.dll "%userprofile%\desktop\$OEM$\$$\Setup\Scripts\BIN"
  204. )
  205. cd /d "%userprofile%\desktop\$OEM$\$$\Setup\Scripts\"
  206. (
  207. echo @Echo off
  208. echo pushd "%%~dp0"
  209. echo cd /d "%%~dp0"
  210. echo ::===========================================================================
  211. echo rem              Edition                          Key              SKU EditionId
  212. echo ^(
  213. echo echo EnterpriseS                    FWN7H-PF93Q-4GGP8-M8RF3-MDWWW 125 X19-99617
  214. echo echo EnterpriseSN                   8V8WN-3GXBH-2TCMG-XHRX3-9766K 126 X19-98770
  215. echo ^) ^> "%%temp%%\editions"
  216. echo ::===========================================================================
  217. 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"
  218. echo for /f "tokens=1-4 usebackq" %%%%a in ^("%%temp%%\editions"^) do ^(if ^^[%%%%a^^]==^^[%%osedition%%^^] ^(
  219. echo     set edition=%%%%a
  220. echo     set key=%%%%b
  221. echo     set sku=%%%%c
  222. echo     set editionId=%%%%d
  223. echo     goto :parseAndPatch^)^)
  224. echo echo %%osedition%% Digital License Activation is Not Supported.
  225. echo del /f "%%temp%%\editions"
  226. echo exit
  227. echo ::===========================================================================
  228. echo :parseAndPatch
  229. echo cd /d "%%~dp0"
  230. echo set "gatherosstate=bin\gatherosstate.exe"
  231. echo cscript /nologo %%windir%%\system32\slmgr.vbs -ipk %%key%%
  232. echo reg add "HKLM\SYSTEM\Tokens" /v "Channel" /t REG_SZ /d "Retail" /f
  233. echo reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Kernel-ProductInfo" /t REG_DWORD /d %%sku%% /f
  234. echo reg add "HKLM\SYSTEM\Tokens\Kernel" /v "Security-SPP-GenuineLocalStatus" /t REG_DWORD /d 1 /f
  235. echo start /wait "" "%%gatherosstate%%"
  236. echo timeout /t 3 ^>nul 2^>^&1
  237. echo clipup -v -o -altto bin\
  238. echo cscript /nologo %%windir%%\system32\slmgr.vbs -ato
  239. echo reg delete "HKLM\SYSTEM\Tokens" /f
  240. echo del /f "%%temp%%\editions"
  241. echo cd %%~dp0
  242. echo rmdir /s /q "%%windir%%\setup\scripts" ^>nul 2^>^&1
  243. echo exit
  244. echo ::===========================================================================
  245. )^> SetupComplete.cmd
  246. cls
  247. echo.
  248. echo.
  249. echo ====================================================
  250. echo $OEM$ folder is successfully created on the Desktop.
  251. echo ====================================================
  252. echo Press any key to continue...
  253. pause >nul
  254. goto:MAINMENU
  255. ::===========================================================
  256. :CheckForUpdates
  257. start https://www.nsaneforums.com/topic/316668-w10-digital-license-activation-script/
  258. goto:MAINMENU
  259. ::===========================================================
  260. :Exit
  261. exit
  262. ::===========================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement