Advertisement
thanhcong94

Untitled

Apr 21st, 2018
1,804
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 233.61 KB | None | 0 0
  1. :: Code by s1ave77 ColdZero ms-7 MasterDisaster xinso
  2. :: Know How by CODYQX4 & mikmik38 & nosferati87 & qad & deagles & Hotbird64 & jm287 & sirWest & CyNecx
  3. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4. @echo off
  5. (NET FILE||(powershell -command Start-Process '%0' -Verb runAs -ArgumentList '%* '&EXIT /B))>NUL 2>&1
  6. setLocal EnableDelayedExpansion
  7. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  8. :CreateRandomIP
  9. set /a num1=%random% %% 50+30
  10. set /a num2=%random% %% 186+20
  11. set "host=10.%num1%.3.%num2%"
  12. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  13. call :CheckToolStart
  14. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  15. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  16. ::MENU SECTION
  17. :Menu1
  18. cls
  19. pushd %~dp0
  20. mode con cols=87 lines=50
  21. color 07
  22. call :TITLE
  23. call :CheckSPPSVC
  24. call :ID
  25. echo:
  26. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  27. echo:
  28. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ M A I N M E N U ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  29. echo:
  30. call :Layout
  31. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  32. echo ° °
  33. echo ++ EMULATORS, SERVICES AND REDIRECT HOOKS +++++++++++++++++++++++++++++++++++++++
  34. echo ° °
  35. echo == (1) KMS EMULATORS MENU =============== (2) KMS SERVICES MENU =================
  36. echo ° °
  37. echo == (3) HOOKED KMS SERVERS MENU ========== (4) KMS CLIENT MENU ===================
  38. echo ° °
  39. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  40. echo ° °
  41. echo ++ CHECK, ACTIVATION AND INFORMATION ++++++++++++++++++++++++++++++++++++++++++++
  42. echo ° °
  43. echo == (C) CHECK STATUS MENU ================ (A) ACTIVATION MENU ===================
  44. echo ° °
  45. echo == (G) ABOUT KMS ACTIVATION =====================================================
  46. echo ° °
  47. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  48. echo ° °
  49. echo ++ TOOLS SECTION ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  50. echo ° °
  51. echo == (S) MODULES AND SYSTEM TOOLS MENU ==== (T) SYS PANEL AND MDL TOOLS MENU ======
  52. echo ° °
  53. echo == (I) SYSINTERNALS, TASKKILL, BOOT MENU ========================================
  54. echo ° °
  55. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  56. echo ° °
  57. echo ²² (P) COMMAND PROMPT ²²²²²²²²²²²²²²²²²²² (E) EXIT ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
  58. echo:
  59. :choice1
  60. CHOICE /C 1234CAGSTIPE /N /M " ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Ü/ YOUR CHOICE \Ü₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ₫>"
  61. if %errorlevel%==1 goto:MenuC
  62. if %errorlevel%==2 goto:Menu2
  63. if %errorlevel%==3 goto:MenuH
  64. if %errorlevel%==4 goto:Menu3
  65. if %errorlevel%==5 goto:MenuA
  66. if %errorlevel%==6 goto:Menu5
  67. if %errorlevel%==7 goto:About
  68. if %errorlevel%==8 goto:StartSystemTools
  69. if %errorlevel%==9 goto:StartTools
  70. if %errorlevel%==10 goto:StartSysInternal
  71. if %errorlevel%==11 goto:CommandPrompt
  72. if %errorlevel%==12 goto:Exit
  73. goto:Menu1
  74. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  75. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  76. :MenuC
  77. cls
  78. mode con cols=87 lines=50
  79. color 0F
  80. echo:
  81. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  82. echo:
  83. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ KMS EMULATORS ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  84. echo:
  85. call :Layout
  86. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  87. echo ° °
  88. echo -- (C) Emulator by CODYQX4 -------------- (D) Emulator by deagles ---------------
  89. echo ° °
  90. echo -- (H) Emulator by Hotbird64 ----------------------------------------------------
  91. echo ° °
  92. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  93. echo ° °
  94. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  95. echo ° °
  96. echo -- (S) Stop Server Emulator -----------------------------------------------------
  97. echo ° °
  98. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  99. echo ° °
  100. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  101. echo ° °
  102. echo -- (A) Create Firewall Rule ------------- (R) Delete Firewall Rule --------------
  103. echo ° °
  104. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  105. echo ° °
  106. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  107. echo ° °
  108. echo ° °
  109. echo ° °
  110. echo ° °
  111. echo ° °
  112. echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² (B) BACK ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
  113. echo:
  114. :choiceC
  115. CHOICE /C CDHSARB /N /M " ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Ü/ YOUR CHOICE \Ü₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ₫>"
  116. if %errorlevel%==1 goto:CodyRunEmulator
  117. if %errorlevel%==2 goto:DeaglesRunEmulator
  118. if %errorlevel%==3 goto:HotbirdRunEmulator
  119. if %errorlevel%==4 goto:StopEmulator
  120. if %errorlevel%==5 goto:FirewallInstall2
  121. if %errorlevel%==6 goto:FirewallDelete2
  122. if %errorlevel%==7 goto:Menu1
  123. goto:MenuC
  124. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  125. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  126. :Menu2
  127. cls
  128. mode con cols=87 lines=50
  129. color 0E
  130. echo:
  131. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  132. echo:
  133. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ KMS SERVER SERVICES ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  134. echo:
  135. call :Layout
  136. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  137. echo ° °
  138. echo -- (C) Service by CODYQX4 [8.1] --------- (K) Service by deagles [Win 8.1] ------
  139. echo ° °
  140. echo -- (H) Service by Hotbird64 [8.1] -----------------------------------------------
  141. echo ° °
  142. echo ° °
  143. echo ° °
  144. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  145. echo ° °
  146. echo -- (U) Uninstall Server Service -------------------------------------------------
  147. echo ° °
  148. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  149. echo ° °
  150. echo -- (S) Settings CODYQX4's --------------- (T) Settings for deagles's-------------
  151. echo ° °
  152. echo -- (V) Settings Hotbird64's -----------------------------------------------------
  153. echo ° °
  154. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  155. echo ° °
  156. echo -- (D) Delete Firewall Rules ------------ (E) Enable Firewall Rules -------------
  157. echo ° °
  158. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  159. echo ° °
  160. echo: ° °
  161. echo ° °
  162. echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² (B) Back ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
  163. echo:
  164. :choice2
  165. CHOICE /C CKHUSTVDEB /N /M " ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Ü/ YOUR CHOICE \Ü₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ₫>"
  166. if %errorlevel%==1 goto:CodyInstall
  167. if %errorlevel%==2 goto:DeaglesInstall
  168. if %errorlevel%==3 goto:Hotbird64Install
  169. if %errorlevel%==4 goto:ServiceUninstall
  170. if %errorlevel%==5 goto:CustomCody
  171. if %errorlevel%==6 goto:CustomDeagles
  172. if %errorlevel%==7 goto:CustomHotbird64
  173. if %errorlevel%==8 goto:FirewallDelete
  174. if %errorlevel%==9 goto:FirewallInstall
  175. if %errorlevel%==10 goto:Menu1
  176. goto:Menu2
  177. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  178. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  179. :MenuH
  180. cls
  181. echo:
  182. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  183. echo:
  184. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ HOOKED KMS SERVERS ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  185. echo:
  186. call :Layout
  187. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  188. echo ° °
  189. echo ++ HOOKS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  190. echo ° °
  191. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  192. echo ° °
  193. echo -- (1) WinDivert 1.1 ------------------- (2) SppExtComObjPatch Hook -------------
  194. echo ° °
  195. echo ° °
  196. echo ° °
  197. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  198. echo ° °
  199. echo ++ HOOKED SERVERS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  200. echo ° °
  201. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  202. echo ° °
  203. echo -- (5) Hook ^& Server by CyNecx --------- (6) ^<^<^< Uninstall ----------------------
  204. echo ° °
  205. echo -- (7) Hook ^& Server by qad ------------ (8) ^<^<^< Uninstall ----------------------
  206. echo ° °
  207. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  208. echo ° °
  209. echo ° °
  210. echo ° °
  211. echo ° °
  212. echo ° °
  213. echo ²² (R) REBOOT ²²²²²²²²²²²²²²²²²²²²²²²²²²² (B) BACK ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
  214. echo:
  215. :choiceH
  216. CHOICE /C 125678B /N /M " ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Ü/ YOUR CHOICE \Ü₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ₫>"
  217. if %errorlevel%==1 goto:WinDivert
  218. if %errorlevel%==2 goto:SppExtComObjPatch
  219. if %errorlevel%==3 goto:CynecxInstall
  220. if %errorlevel%==4 goto:CynecxUnInstall
  221. if %errorlevel%==5 goto:QADInstall
  222. if %errorlevel%==6 goto:QADUnInstall
  223. if %errorlevel%==7 goto:Menu1
  224. goto:MenuH
  225. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  226. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  227. :Menu3
  228. cls
  229. mode con cols=87 lines=50
  230. color 0B
  231. echo:
  232. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  233. echo:
  234. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ KMS CLIENT EMULATOR ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  235. echo:
  236. call :Layout
  237. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  238. echo ° °
  239. echo ---------------------- (C) KMS Client Emulator by CODYQX4 -----------------------
  240. echo ° °
  241. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  242. echo ° °
  243. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  244. echo ° °
  245. echo ---------------------- (H) KMS Client Emulator by Hotbird64 ---------------------
  246. echo ° °
  247. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  248. echo ° °
  249. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  250. echo ° °
  251. echo ° °
  252. echo ° °
  253. echo ° °
  254. echo ° °
  255. echo ° °
  256. echo ° °
  257. echo ° °
  258. echo ° °
  259. echo ° °
  260. echo ° °
  261. echo ° °
  262. echo ° °
  263. echo ²²²²²²²²²²²²²²²²²²²²²² (B) BACK ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
  264. echo:
  265. :choice3
  266. CHOICE /C CHB /N /M " ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Ü/ YOUR CHOICE \Ü₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ₫>"
  267. if %errorlevel%==1 goto:CodyInput
  268. if %errorlevel%==2 goto:HotbirdInput
  269. if %errorlevel%==3 goto:Menu1
  270. goto:Menu3
  271. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  272. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  273. :MenuA
  274. cls
  275. mode con cols=87 lines=50
  276. color 0A
  277. call :CheckSPPSVC
  278. call :ID
  279. echo:
  280. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  281. echo:
  282. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ CHECK STATUS ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  283. echo:
  284. call :Layout
  285. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  286. echo ° °
  287. echo -- (1) CHECK SERVERS -------------------- (2) CHECK EMULATOR --------------------
  288. echo ° °
  289. echo -- (3) CHECK PHYSICAL HOST -------------- (4) CHECK PORT ------------------------
  290. echo ° °
  291. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  292. echo ° °
  293. echo ++ (C) ACTIVATION STATUS ALL ++++++++++++++++++++++++++++++++++++++++++++++++++++
  294. echo ° °
  295. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  296. echo ° °
  297. echo -- (H) Halt Service -------------------------------------------------------------
  298. echo ° °
  299. echo -- (R) Restart Service manually --------- (S) Start Service ---------------------
  300. echo ° °
  301. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  302. echo ° °
  303. echo -- (I) IP Lookup ------------------------ (L) Clear all Logs --------------------
  304. echo ° °
  305. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  306. echo ° °
  307. echo ° °
  308. echo ° °
  309. echo ° °
  310. echo ° °
  311. echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² (B) BACK ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
  312. echo:
  313. :choiceA
  314. CHOICE /C 1234CRHSILB /N /M " ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Ü/ YOUR CHOICE \Ü₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ₫>"
  315. if %errorlevel%==1 goto:CheckInstall
  316. if %errorlevel%==2 goto:CheckEmulator
  317. if %errorlevel%==3 goto:CheckRealHost
  318. if %errorlevel%==4 goto:CheckPortUsage
  319. if %errorlevel%==5 goto:CheckActivation
  320. if %errorlevel%==6 goto:RestartService
  321. if %errorlevel%==7 goto:HaltService
  322. if %errorlevel%==8 goto:StartService
  323. if %errorlevel%==9 goto:Ipconfig
  324. if %errorlevel%==10 goto:ClearLogs
  325. if %errorlevel%==11 goto:Menu1
  326. goto:MenuA
  327. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  328. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  329. :Menu5
  330. cls
  331. mode con cols=87 lines=50
  332. color 0C
  333. call :CheckSPPSVC
  334. call :ID
  335. echo:
  336. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  337. echo:
  338. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ACTIVATION ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  339. echo:
  340. call :Layout
  341. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  342. echo ° °
  343. echo ++ (W) ACTIVATE WINDOWS +++++++++++++++++ (O) ACTIVATE OFFICE +++++++++++++++++++
  344. echo ° °
  345. echo ++ (I) INSTALL PRODUCT KEY ++++++++++++++ (Z) REARM OFFICE 2013 +++++++++++++++++
  346. echo ° °
  347. echo ++ (T) RE-ACTIVATION TASK +++++++++++++++ (C) CONVERT OFFICE 15/16 INSTALL ++++++
  348. echo ° °
  349. echo ++ (F) OFFICE FIXITs ++++++++++++++++++++ (U) UNINSTALL OFFICE LICENSE ++++++++++
  350. echo ° °
  351. echo +++++++++++++++++++++++++++++++++++++++++ (D) DOWNLOAD/INSTALL OFFICE 16 ++++++++
  352. echo ° °
  353. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  354. echo ° °
  355. echo ++ ACTIVATE WITH CHOICE +++++++++++++++++ ACTIVATE ALL AUTOMATICALLY ++++++++++++
  356. echo ° °
  357. echo -- (1) Instant Run [CODY/qad] ---------- (2) "Quick 'n Dirty" [CODY/qad] -------
  358. echo ° °
  359. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  360. echo ° °
  361. echo -- (P) Activate by Phone ---------------- (R) Rebuild License -------------------
  362. echo ° °
  363. echo -- (V) Validate Win 7 Online ------------ (E) Export Tokens [Win 8 up] ----------
  364. echo ° °
  365. echo -- (K) Block MS KMS-Check --------------- (L) Unblock MS KMS-Check --------------
  366. echo ° °
  367. echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² (B) BACK ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
  368. echo:
  369. :choice5
  370. CHOICE /C WOIZTCFUD12PRVEKLB /N /M " ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Ü/ YOUR CHOICE \Ü₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ₫>"
  371. if %errorlevel%==1 goto:Activate
  372. if %errorlevel%==2 goto:ActivateOffice
  373. if %errorlevel%==3 goto:KeyInstall
  374. if %errorlevel%==4 goto:RearmOffice
  375. if %errorlevel%==5 goto:ReactivationTasks
  376. if %errorlevel%==6 goto:ConvertOffice
  377. if %errorlevel%==7 goto:OfficeFixit
  378. if %errorlevel%==8 goto:UninstallOffice
  379. if %errorlevel%==9 goto:Office16VnextInstall
  380. if %errorlevel%==10 goto:InstantActivation
  381. if %errorlevel%==11 goto:QuickAndDirtyQAD
  382. if %errorlevel%==12 goto:CallMS
  383. if %errorlevel%==13 goto:RebuildLicense
  384. if %errorlevel%==14 goto:Validate
  385. if %errorlevel%==15 goto:ExportTokens
  386. if %errorlevel%==16 goto:BlockCheck
  387. if %errorlevel%==17 goto:UnBlockCheck
  388. if %errorlevel%==18 goto:Menu1
  389. goto:Menu5
  390. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  391. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  392. :About
  393. cls
  394. color 0B
  395. echo:
  396. echo ÛßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÛ
  397. echo: Û Û
  398. echo Û ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ ABOUT KMS ACTIVATION ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ Û
  399. echo: Û Û
  400. echo ÛÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜÛ
  401. echo:
  402. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  403. echo: ° °
  404. echo ° FIRST: As there won't be any serious Loader for Win 8, like the one by Daz °
  405. echo ° for Win 7, due to O.A 3.0, there are only two ways for legit activation: °
  406. echo ° (1) legit RETAIL Key or MAK or (2) volume-based KMS activation. °
  407. echo: ° °
  408. echo ° With RTM of Win 8.1 Microsoft introduced KMS V6 protocol, which refuses °
  409. echo ° activation via localhost. Now a redirect hook is needed to reach the Host. °
  410. echo: ° °
  411. echo ° The new solutions work for Win 8 and 8.1, but are not downward compatible. °
  412. echo ° So for Win 7 and Server 2008 R2 the old solutions needed to be installed. °
  413. echo: ° °
  414. echo ° NOTE: "Instant Run" and "Quick & Dirty" will determine the OS Version by °
  415. echo ° buildstring and automatically install the proper Server. °
  416. echo: ° °
  417. echo: ° °
  418. echo ° LIMITATION: Volume-based activation is time-limitted by design. °
  419. echo: ° °
  420. echo ° WIN 7 : Professional, Enterprise and Servers (180 days) °
  421. echo: ° °
  422. echo ° WIN 8 : Pro, Ent and Servers (180 days); Core ^& ProfessionalWMC (30 days) °
  423. echo: ° °
  424. echo ° WIN 8.1: Pro, Ent and Servers (180 days); Core ^& ProfessionalWMC (45 days) °
  425. echo: ° °
  426. echo ° OFFICE : Office 2010 ProPlus VL and Office 2013 ProPlus VL (180 days) °
  427. echo: ° °
  428. echo °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  429. echo:
  430. echo YOUR SYSTEM : %computername%
  431. echo STATUS : %license% %left%
  432. echo OS-NAME : %ver% %comment%
  433. echo CHANNEL : %channel%
  434. echo OS-BUILD : %build%.%build1%
  435. echo OS-EDITION : %edition%
  436. echo OS-ARCITECTURE: %vera%
  437. echo ÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÛ
  438. echo Û Greetings to all MDL menbers out there, keep reaching the rainbow. Û
  439. echo ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
  440. echo:
  441. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ (c) s1ave77 (tm) [SUCKERS Inc. (SubNode Beta)] ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  442. echo:
  443. echo ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ/ press any key to continue \ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ && pause >nul
  444. goto:BroughtToYou
  445. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  446. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  447. :BroughtToYou
  448. cls
  449. color 04
  450. echo:
  451. echo ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
  452. echo ÛßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÛ
  453. echo ÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÛ
  454. echo Û ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ THIS TOOL IS BROUGHT TO YOU BY: ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ Û
  455. echo ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
  456. echo ÛÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜÛ
  457. echo ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
  458. echo:
  459. echo ÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛ
  460. echo ÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛ
  461. echo Û Û ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ Û Û
  462. echo ÛßÛ Û₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Û ÛßÛ
  463. echo ÛÜÛ Û₫ÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÛ₫Û ÛÜÛ
  464. echo Û Û Û₫Û ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ Û₫Û Û Û
  465. echo ÛßÛ Û₫Û Û²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²ÛÛ ß ÛÛ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²Û Û₫Û ÛßÛ
  466. echo ÛÜÛ Û₫Û Û±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±Û ÜÛÜ Û±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±Û Û₫Û ÛÜÛ
  467. echo Û Û Û₫Û Û°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°ÛÜ ß ÜÛ°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°Û Û₫Û Û Û
  468. echo Û ÜÜ Ü ÜÜÜ Ü ÜÜÜ Ü Ü ÜÜÜ Ü ÜÜ ÜÜÜ ÜÜ Ü ÜÜ ÜÜÜ ÜÜ Ü ÜÜÜ ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
  469. echo Û ß ÜÜßß²²Û ÜÛ±Û±ßÛ Û²²ßßÜÜ ß ÛÛÛÛ ÛÛÛÛ ß ÜÜßß²²Û Ûß±ÛßßÛß±Û Ûß±ÛßßÛß±Û Û
  470. echo Û ÜÛßßÛ±±±Û ßßÛ²²Û Û Û±±±ÛßßÛÜ ÛßÛÛ ÛÛßÛ ÜÛßßÛ±±±Û Û±±Û Û²²Û Û±±Û Û²²Û Û
  471. echo Û Û²±Û Û°°Û Û²²± Û Û°°Û Û²²Û Û²²Û Û²²Û Û²±Û Û°°Û ÛÛßß Û²²Û ÛÛßß Û²²Û Û
  472. echo Û Û²²Û ßßÛß Û±±° Û ßÛßß Û²²Û Û²²Û Û²²Û Û±±Û Û±ÛÜ Ü ÛÛ±Û Ü ÛÛ±Û Û
  473. echo Û ßÛÛÜ Ü²Ü ß°±± ß Ü²Ü ÜÛ±±Û ÛÛ±Û Û±ÛÛ ÛÛ±Û Û°°Û Ü²Ü ß±±Û Ü²Ü ß±±Û Û
  474. echo Û ÛÜ ßÛÛÜÜ ß Û°°² Û ß ÜÜÛßßÛ±±Û Ü Û±±Û Û±±Û Ü Û°°ÛÜÜÛßß ß Ü Û°°Û ß Ü Û°°Û Û
  475. echo Û ÛÛÛÛ Û°°±ßÛ ÛÛÛÛ Û°°Ü Ü Ü°°Û Û°°Ü Ü Ü°°Ûß Û°°Û Û°°Û Û
  476. echo Û ÛÛÜÜ Û²²Û ±Û±± Û Û²²Û ß°°Û ÛÛ°Û Û°ÛÛ Û±±Û ÜÜÛÛ ß ß Û±±ß ß ß Û±±ß Û
  477. echo Û Û²²Û Û±±Û Ü Û°°° Û Ü Û±±Û Û±ÜÛ Û±±Û Û±±Û Û±±Û Û°°Û °Ûß° Û±±Û °Ûß° Û±±Û Û
  478. echo Û Ü±±Û Û°°Ü Ü Ü²²² Ü Ü Ü°°Û Û²²Û ßÜ Û Û Üß ÛÛ±Û Û±±Ü ±± ° Û²²Û ±± ° Û²²Û Û
  479. echo Û Û°°Û ÛÛÜÛ ÛÛ±Û Û ÛÜÛÛ Û²ÛÛ Ü²Ü ßÛÛÜÛÛß Ü²Ü Û±ÜÛ ÛÛÛÛ Ü ßß Û²²Û Ü ßß Û²²Û Û
  480. echo Û ßßÛÛÛÛß Ü ÜÜÛÜÛÛÜÛÜÜ ßßÛÛÛÛÛÛÛÜ ß Ü ßÛß Ü ß Ü ßßÛÛÛÛß ÜÜß²ß ÜÜÛÛÛÛÜß²ß ÜÜÛÛÛÛÜÛ
  481. echo Û Ü Û
  482. echo Û Û Û₫Û Û°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°Ûß Ü ßÛ°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°Û Û₫Û Û Û
  483. echo ÛßÛ Û₫Û Û±±±±±±±±±±±±±±±±±±±±±D±±C±±L±±Û ßÛß Û±±X±±V±±I±±±±±±±±±±±±±±±±±±±±±Û Û₫Û ÛßÛ
  484. echo ÛÜÛ Û₫Û Û²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²ÛÛ Ü ÛÛ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²Û Û₫Û ÛÜÛ
  485. echo Û Û Û₫Û ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ Û₫Û Û Û
  486. echo ÛßÛ Û₫ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ₫Û ÛßÛ
  487. echo ÛÜÛ Û₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫Û ÛÜÛ
  488. echo Û Û ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß Û Û
  489. echo ÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛßÛ
  490. echo ÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛÜÛ
  491. echo:
  492. echo ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
  493. echo:
  494. echo ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫ (c) s1ave77 (tm) [SUCKERS Inc. (SubNode Beta)] ₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫₫
  495. echo:
  496. echo ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
  497. echo:
  498. echo ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ/ press any key to continue \ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ && pause >nul
  499. goto:Menu1
  500. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  501. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  502. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  503. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  504. ::EMULATOR START SECTION
  505. :CodyRunEmulator
  506. color 0F
  507. pushd %~dp0
  508. cls
  509. call :HEADER "This option runs KMS Server Emulator by CODYQX4", " "
  510. echo:
  511. call :SetEmulatorData
  512. echo:
  513. call :CodyPID
  514. cls
  515. call :HEADER "This option runs KMS Server Emulator by CODYQX4", " "
  516. if exist "%windir%\KMSServer\KMSServer.exe" del /s /q "%windir%\KMSServer\KMSServer.exe" >nul
  517. xcopy "files\KMS Server %vera%.exe" "%windir%\KMSServer\" /Q /S >nul
  518. ren "%windir%\KMSServer\KMS Server %vera%.exe" "KMSServer.exe"
  519. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=any
  520. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  521. call :RegCODY
  522. call :RegOffice
  523. start "KMS Emulator by CODYQX4 (01/31/2014)" cmd /c "%windir%\KMSServer\KMSServer.exe"
  524. goto:MenuC
  525. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  526. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  527. :HotbirdRunEmulator
  528. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  529. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  530. set WindowsPid=Random
  531. set Office2010Pid=Random
  532. set Office2013Pid=Random
  533. color 0F
  534. pushd %~dp0
  535. cls
  536. call :HEADER "This option runs KMS Server Emulator by Hotbird64", " "
  537. echo:
  538. call :SetEmulatorData
  539. echo:
  540. echo Windows ePID %WindowsPid%
  541. echo Office 2010 ePID %Office2010Pid%
  542. echo Office 2013 ePID %Office2013Pid%
  543. call :FOOTER
  544. set /p WindowsPid=Set WindowsPid ^>
  545. set /p Office2010Pid=Set Office2010Pid ^>
  546. set /p Office2013Pid=Set Office2013Pid ^>
  547. cls
  548. call :HEADER "This option runs KMS Server Emulator by Hotbird64", " "
  549. if exist "%windir%\KMSServer\KMSServer.exe" del /s /q "%windir%\KMSServer\KMSServer.exe" >nul
  550. xcopy "files\kms-hgm.exe" "%windir%\KMSServer\" /Q /Y >nul
  551. ren "%windir%\KMSServer\kms-hgm.exe" "KMSServer.exe"
  552. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=any
  553. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  554. call :RegOffice
  555. call :RegDH
  556. start "KMS Emulator by Hotbird64 (10/03/2014)" cmd /c "%windir%\KMSServer\KMSServer.exe" Port=%port% Office2010=%Office2010Pid% Office2013=%Office2013Pid% Windows=%WindowsPid% RenewalInterval=%sri%
  557. goto:MenuC
  558. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  559. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  560. :DeaglesRunEmulator
  561. color 0F
  562. pushd %~dp0
  563. set WindowsPid="05426-00206-152-251264-03-1031-9200.0000-0902013"
  564. set Office2010Pid="05426-00206-234-251264-03-1031-9200.0000-0902013"
  565. set Office2013Pid="55041-00096-199-251264-03-1031-9200.0000-0902013"
  566. cls
  567. call :HEADER "This option runs KMS Server Emulator by deagles", " "
  568. echo:
  569. call :SetEmulatorData
  570. echo:
  571. echo Windows ePID=%WindowsPid%
  572. echo Office 2010 ePID=%Office2010Pid%
  573. echo Office 2013 ePID=%Office2013Pid%
  574. call :FOOTER
  575. set /p WindowsPid=Set Windows ePID ^>
  576. set /p Office2010Pid=Set Office 2010 ePID ^>
  577. set /p Office2013Pid=Set Office 2013 ePID ^>
  578. cls
  579. call :HEADER "This option runs KMS Server Emulator by deagles", " "
  580. if exist "%windir%\KMSServer\KMSServer.exe" del /s /q "%windir%\KMSServer\KMSServer.exe" >nul
  581. xcopy "files\kms.exe" "%windir%\KMSServer\" /Q /Y >nul
  582. ren "%windir%\KMSServer\kms.exe" "KMSServer.exe"
  583. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=any
  584. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  585. call :RegOffice& call :RegDH
  586. start "KMS Emulator by deagles (May 2014)" cmd /c "%windir%\KMSServer\KMSServer.exe"
  587. goto:MenuC
  588. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  589. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  590. :StopEmulator
  591. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  592. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  593. cls
  594. call :HEADER "This option stops KMS Server Emulator", " "
  595. echo Checking for Server Emulator instances:
  596. echo:
  597. wmic process where "name='KMSServer.exe'" | findstr /i /c:"KMSServer.exe" >nul
  598. if %errorlevel%==1 call :ServerNotRunning
  599. if %errorlevel%==1 goto:MenuC
  600. echo:
  601. TASKKILL /F /IM "KMSServer.exe" >nul
  602. netsh advfirewall firewall delete rule name="KMS Server Emulator"
  603. call :UnRegOffice
  604. reg delete "HKLM\SYSTEM\CurrentControlSet\Services\KMSServerService" /f >nul 2>&1
  605. reg delete "HKLM\SYSTEM\CurrentControlSet\services\KMSServer" /f >nul 2>&1
  606. if exist "%windir%\KMSServer\" rd /s /q "%windir%\KMSServer\" >nul
  607. if exist "kms.ini" del /s /q "kms.ini" /f >nul
  608. goto:MenuC
  609. :ServerNotRunning
  610. echo:
  611. echo ...Server Emulator is not running.
  612. call :FOOTER
  613. timeout /t 5
  614. goto:MenuC
  615. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  616. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  617. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  618. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  619. ::KMS SERVICES SECTION
  620. :CodyInstall
  621. cls
  622. call :HEADER "This option installs the KMS Server Service by CODYQX4 ", " "
  623. call :SetServiceData
  624. call :CodyPID
  625. cls
  626. call :HEADER "This option installs the KMS Server Service by CODYQX4 ", " "
  627. call :Initiate
  628. call :FOOTER
  629. call :RegCody
  630. call :RegOffice
  631. sc create %name% binPath= "%windir%\%name%\%name%.exe" type= own error= normal obj= "NT AUTHORITY\NetworkService" start= %start% DisplayName= %name%
  632. call :FOOTER
  633. net start %name% >nul
  634. if %errorlevel% equ 0 echo Successfully started %name%.
  635. if %errorlevel% neq 0 echo Starting %name% Failed.
  636. call :FOOTER
  637. timeout /t 5
  638. goto:Menu2
  639. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  640. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  641. :DeaglesInstall
  642. set WindowsPid="05426-00206-152-251264-03-1031-9200.0000-0902013"
  643. set Office2010Pid="05426-00206-234-251264-03-1031-9200.0000-0902013"
  644. set Office2013Pid="55041-00096-199-251264-03-1031-9200.0000-0902013"
  645. set hService="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\%name%\Parameters"
  646. pushd "%~dp0"
  647. cls
  648. call :HEADER "This option installs the KMS Server Service by deagles", " "
  649. call :SetServiceData
  650. cls
  651. call :HEADER "This option installs the KMS Server Service by deagles", " "
  652. echo Windows ePID %WindowsPid%
  653. echo Office 2010 ePID %Office2010Pid%
  654. echo Office 2013 ePID %Office2013Pid%
  655. call :FOOTER
  656. set /p WindowsPid=Set WindowsPid ^>
  657. set /p Office2010Pid= Set Office2010Pid ^>
  658. set /p Office2013Pid=Set Office2013Pid ^>
  659. cls
  660. call :HEADER "This option installs the KMS Server Service by deagles", " "
  661. call :RegDH
  662. call :RegOffice
  663. call :Initiate
  664. sc create %name% binPath= "%windir%\%name%\%name%.exe" type= own error= normal obj= "NT AUTHORITY\NetworkService" start= %start% DisplayName= %name%
  665. echo:
  666. net start %name% >nul
  667. if %errorlevel% equ 0 echo Successfully started %name%.
  668. if %errorlevel% neq 0 echo Starting %name% Failed.
  669. call :FOOTER
  670. timeout /t 5
  671. goto:Menu2
  672. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  673. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  674. :Hotbird64Install
  675. set WindowsPid="05426-00206-152-251264-03-1031-9200.0000-0902013"
  676. set Office2010Pid="05426-00206-234-251264-03-1031-9200.0000-0902013"
  677. set Office2013Pid="55041-00096-199-251264-03-1031-9200.0000-0902013"
  678. set hService="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\KMS\Parameters"
  679. cls
  680. call :HEADER "This option installs the KMS Server Service by Hotbird64", " "
  681. call :SetServiceData
  682. cls
  683. call :HEADER "This option installs the KMS Server Service by Hotbird64", " "
  684. echo Run Service with RandomKMSPID or enter ePIDs manually?
  685. CHOICE /C RM /M "......Set ePID mode :"
  686. if %errorlevel%==1 set rpid=1 && goto :furtherH1
  687. if %errorlevel%==2 set rpid=0 && goto :furtherH2
  688. :furtherH2
  689. echo:
  690. echo Windows ePID %WindowsPid%
  691. echo Office 2010 ePID %Office2010Pid%
  692. echo Office 2013 ePID %Office2013Pid%
  693. call :FOOTER
  694. set /p WindowsPid=Set WindowsPid ^>
  695. set /p Office2010Pid=Set Office2010Pid ^>
  696. set /p Office2013Pid=Set Office2013Pid ^>
  697. echo:
  698. :furtherH1
  699. cls
  700. call :HEADER "This option installs the KMS Server Service by Hotbird64", " "
  701. call :RegDH
  702. reg add %hService% /f /v "RandomPID" /d %rpid% /t "REG_DWORD" >nul
  703. call :RegOffice
  704. call :Initiate
  705. sc create %name% binPath= "%windir%\%name%\%name%.exe" type= own error= normal obj= "NT AUTHORITY\NetworkService" start= %start% DisplayName= %name%
  706. net start %name%
  707. call :FOOTER
  708. timeout /t 5
  709. goto:Menu2
  710. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  711. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  712. :CustomCody
  713. cls
  714. pushd "%~dp0"
  715. call :HEADER "This option change ePID, Port and Intervals (sai/sri) for KMS Server Service", " "
  716. echo:
  717. set triggerS=4
  718. call :SetServiceData
  719. call :CodyPID
  720. :InstallServiceCODY2
  721. cls
  722. call :HEADER "This option installs the KMS Server Service by CODYQX4 ", " "
  723. net stop %name% >nul
  724. if %errorlevel% equ 0 echo Successfully stopped %name%.
  725. if %errorlevel% neq 0 echo Stopping %name% Failed.
  726. call :RegCody
  727. sc config %name% start= %start%
  728. netsh advfirewall firewall add rule name="%name% %port%" dir=in program="%windir%\%name%\%name%.exe" localport=%port% protocol=TCP action=allow remoteip=any
  729. netsh advfirewall firewall add rule name="%name% %port%" dir=in program="%windir%\%name%\%name%.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  730. call :FOOTER
  731. CHOICE /C YN /M "Start Sevice now? :"
  732. if %errorlevel%==1 goto :start2
  733. if %errorlevel%==2 goto:Menu2
  734. :start2
  735. echo:
  736. net start %name% >nul
  737. if %errorlevel% equ 0 echo Successfully started %name%.
  738. if %errorlevel% neq 0 echo Starting %name% Failed.
  739. call :FOOTER
  740. timeout /t 5
  741. goto:Menu2
  742. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  743. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  744. :CustomDeagles
  745. set WindowsPid="05426-00206-152-251264-03-1031-9200.0000-0902013"
  746. set Office2010Pid="05426-00206-234-251264-03-1031-9200.0000-0902013"
  747. set Office2013Pid="55041-00096-199-251264-03-1031-9200.0000-0902013"
  748. cls
  749. pushd "%~dp0"
  750. call :HEADER "This option change ePID, Port and Intervals (sai/sri) for KMS Server Service", " "
  751. echo:
  752. set triggerS=4
  753. call :SetServiceData
  754. cls
  755. call :HEADER "This option installs the KMS Server Service by deagles", " "
  756. if /i "%WindowsPid%"=="" set WindowsPid="05426-00206-152-251264-03-1031-9200.0000-0902013"
  757. if /i "%Office2010Pid%"=="" set Office2010Pid="05426-00206-234-251264-03-1031-9200.0000-0902013"
  758. if /i "%Office2013Pid%"=="" set Office2013Pid="55041-00096-199-251264-03-1031-9200.0000-0902013"
  759. echo Windows ePID %WindowsPid%
  760. echo Office 2010 ePID %Office2010Pid%
  761. echo Office 2013 ePID %Office2013Pid%
  762. call :FOOTER
  763. set /p WindowsPid=Set WindowsPid ^>
  764. set /p Office2010Pid=Set Office2010Pid ^>
  765. set /p Office2013Pid=Set Office2013Pid ^>
  766. cls
  767. call :HEADER "This option installs the KMS Server Service by deagles", " "
  768. net stop %name% >nul
  769. if %errorlevel% equ 0 echo Successfully stopped %name%.
  770. if %errorlevel% neq 0 echo Stopping %name% Failed.
  771. sc config %name% start= %start%
  772. set hService="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\%name%\Parameters"
  773. call :RegDH
  774. CHOICE /C YN /M "Start Sevice now? :"
  775. if %errorlevel%==1 goto :start20
  776. if %errorlevel%==2 goto:Menu2
  777. :start20
  778. echo:
  779. net start %name% >nul
  780. if %errorlevel% equ 0 echo Successfully started %name%.
  781. if %errorlevel% neq 0 echo Starting %name% Failed.
  782. call :FOOTER
  783. timeout /t 5
  784. goto:Menu2
  785. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  786. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  787. :CustomHotbird64
  788. set WindowsPid="05426-00206-152-251264-03-1031-9200.0000-0902013"
  789. set Office2010Pid="05426-00206-234-251264-03-1031-9200.0000-0902013"
  790. set Office2013Pid="55041-00096-199-251264-03-1031-9200.0000-0902013"
  791. cls
  792. pushd "%~dp0"
  793. call :HEADER "This option change ePID, Port and Intervals (sai/sri) for KMS Server Service", " "
  794. echo:
  795. set triggerS=4
  796. call :SetServiceData
  797. cls
  798. call :HEADER "This option installs the KMS Server Service by Hotbird64", " "
  799. echo Run Service with RandomKMSPID or enter ePIDs manually?
  800. CHOICE /C RM /M "Set ePID mode :"
  801. if %errorlevel%==1 set rpid=1 && goto :furtherH5
  802. if %errorlevel%==2 set rpid=0 && goto :furtherH6
  803. :furtherH6
  804. echo:
  805. echo Windows ePID %WindowsPid%
  806. echo Office 2010 ePID %Office2010Pid%
  807. echo Office 2013 ePID %Office2013Pid%
  808. call :FOOTER
  809. set /p WindowsPid=Set WindowsPid ^>
  810. set /p Office2010Pid=Set Office2010Pid ^>
  811. set /p Office2013Pid=Set Office2013Pid ^>
  812. echo:
  813. :furtherH5
  814. cls
  815. call :HEADER "This option installs the KMS Server Service by Hotbird64", " "
  816. net stop %name% >nul
  817. if %errorlevel% equ 0 echo Successfully stopped %name%.
  818. if %errorlevel% neq 0 echo Stopping %name% Failed.
  819. sc config %name% start= %start%
  820. set hService="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\KMS\Parameters"
  821. call :RegDH
  822. reg add %hService% /f /v "RandomPID" /d %rpid% /t "REG_DWORD" >nul
  823. CHOICE /C YN /M "Start Sevice now? :"
  824. if %errorlevel%==1 goto :startH
  825. if %errorlevel%==2 goto:Menu2
  826. :startH
  827. echo:
  828. net start %name% >nul
  829. if %errorlevel% equ 0 echo Successfully started %name%.
  830. if %errorlevel% neq 0 echo Starting %name% Failed.
  831. call :FOOTER
  832. timeout /t 5
  833. goto:Menu2
  834. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  835. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  836. :ServiceUninstall
  837. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  838. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  839. set "hService=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\KMS"
  840. set "hService2=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\%name%"
  841. cls
  842. call :HEADER "This option uninstalls KMS Server Service", " "
  843. echo:
  844. if /i "%name%"=="" set name=KMSServer
  845. echo Default: %name%
  846. echo Values: Servername
  847. echo:
  848. sc query %name% >nul
  849. if errorlevel 1 goto :NotInstalled
  850. if /i "%port%"=="" set "port=1688"
  851. echo Default: %port%
  852. echo Values: Port
  853. call :FOOTER
  854. set /p name=Set name ^>
  855. set /p port=Set port ^>
  856. echo:
  857. echo:
  858. net stop %name% >nul
  859. if %errorlevel% equ 0 echo Successfully stopped %name%.
  860. if %errorlevel% neq 0 echo Stopping %name% Failed.
  861. sc delete %name%
  862. reg delete %hService% /f >nul 2>&1
  863. reg delete %hService2% /f >nul 2>&1
  864. call :FOOTER
  865. call :UnRegOffice
  866. SchTasks /Delete /TN "Reactivate Service MINUTE" /F >nul 2>&1
  867. SchTasks /Delete /TN "Reactivate Service HOURLY" /F >nul 2>&1
  868. SchTasks /Delete /TN "Reactivate Service DAILY" /F >nul 2>&1
  869. SchTasks /Delete /TN "Reactivate Service WEEKLY" /F >nul 2>&1
  870. SchTasks /Delete /TN "Reactivate Service MONTHLY" /F >nul 2>&1
  871. SchTasks /Delete /TN "Reactivate Service ONSTART" /F >nul 2>&1
  872. SchTasks /Delete /TN "Reactivate Service ONLOGON" /F >nul 2>&1
  873. SchTasks /Delete /TN "Reactivate Instant MINUTE" /F >nul 2>&1
  874. SchTasks /Delete /TN "Reactivate Instant HOURLY" /F >nul 2>&1
  875. SchTasks /Delete /TN "Reactivate Instant DAILY" /F >nul 2>&1
  876. SchTasks /Delete /TN "Reactivate Instant WEEKLY" /F >nul 2>&1
  877. SchTasks /Delete /TN "Reactivate Instant MONTHLY" /F >nul 2>&1
  878. SchTasks /Delete /TN "Reactivate Instant ONSTART" /F >nul 2>&1
  879. SchTasks /Delete /TN "Reactivate Instant ONLOGON" /F >nul 2>&1
  880. netsh advfirewall firewall delete rule name="%name% %port%"
  881. if exist "%windir%\%name%" rd /s /q "%windir%\%name%" >nul
  882. call :FOOTER
  883. echo:
  884. timeout /t 5
  885. goto:Menu2
  886. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  887. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  888. :NotInstalled
  889. echo:
  890. echo ...Service is not installed.
  891. echo:
  892. echo:
  893. timeout /t 5
  894. goto:Menu2
  895. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  896. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  897. :FirewallInstall
  898. cls
  899. call :HEADER "This option installs Firewall Rule for Service", " "
  900. echo:
  901. if /i "%name%"=="" set name=KMSServer
  902. if /i "%port%"=="" set "port=1688"
  903. echo Default: %name%
  904. echo Default: %port%
  905. call :FOOTER
  906. set /p name=Set name ^>
  907. set /p port=Set port ^>
  908. echo:
  909. sc query %name% >nul
  910. if errorlevel 1 (
  911. call :NotInstalled
  912. goto:Menu2
  913. )
  914. if errorlevel 1 goto:Menu2
  915. netsh advfirewall firewall add rule name="%name% %port%" dir=in program="%windir%\%name%\%name%.exe" localport=%port% protocol=TCP action=allow remoteip=any
  916. netsh advfirewall firewall add rule name="%name% %port%" dir=in program="%windir%\%name%\%name%.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  917. call :FOOTER
  918. timeout /t 5
  919. goto:Menu2
  920. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  921. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  922. :FirewallDelete
  923. cls
  924. call :HEADER "This option deletes Firewall Rule for Service", " "
  925. echo:
  926. if /i "%name%"=="" set name=KMSServer
  927. if /i "%port%"=="" set "port=1688"
  928. echo Default: %name%
  929. echo Default: %port%
  930. call :FOOTER
  931. set /p name=Set name ^>
  932. set /p port=Set port ^>
  933. echo:
  934. sc query %name% >nul
  935. if errorlevel 1 (
  936. call :NotInstalled
  937. goto:Menu2
  938. )
  939. if errorlevel 1 goto:Menu2
  940. netsh advfirewall firewall delete rule name="%name% %port%"
  941. call :FOOTER
  942. timeout /t 5
  943. goto:Menu2
  944. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  945. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  946. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  947. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  948. ::HOOKED EMULATORS SECTION
  949. :WinDivert
  950. pushd "%~dp0"
  951. cls
  952. call :HEADER "This option installs the WinDivert1.1 Hook ", " "
  953. echo:
  954. if not %win% GEQ 9200 (
  955. call :NotSupported
  956. goto:MenuH
  957. )
  958. wmic process where "name='FakeClient.exe'" | findstr /i /c:"FakeClient.exe" >nul
  959. if %errorlevel%==0 (
  960. echo Hook is already installed.
  961. call :FOOTER
  962. timeout /t 5
  963. goto :DeleteWinDivert
  964. )
  965. call :FOOTER
  966. echo Default: %host%
  967. echo Values: Host IP
  968. call :FOOTER
  969. set /p host=Set Host IP ^>
  970. call :FOOTER
  971. if exist "%windir%\Hook" rd /s /q "%windir%\Hook" >nul
  972. xcopy "files\windivert1.1\%vera%\FakeClient.exe" "%windir%\Hook\" /Q /S
  973. route print | find /i "10.255.255.254" >nul 2>&1
  974. if %errorlevel% neq 0 (route add %host% 10.255.255.254 IF 1 >nul 2>&1)
  975. pushd files\windivert1.1\%vera%
  976. cmd /c start /b /high FakeClient.exe %host% >nul 2>&1
  977. popd
  978. ping -n 2 localhost
  979. call :FOOTER
  980. timeout /t 5
  981. goto:MenuH
  982. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  983. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  984. :DeleteWinDivert
  985. pushd "%~dp0"
  986. cls
  987. call :HEADER "This option uninstalls the WinDivert1.1 Hook", " "
  988. echo:
  989. if not %win% GEQ 9200 (
  990. call :NotSupported
  991. goto:MenuH
  992. )
  993. taskkill /t /f /IM FakeClient.exe
  994. route delete %host% 10.255.255.254
  995. sc delete WinDivert1.1
  996. if exist "%windir%\Hook" rd /s /q "%windir%\Hook" >nul
  997. call :FOOTER
  998. timeout /t 5
  999. goto:MenuH
  1000. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1001. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1002. :SppExtComObjPatch
  1003. cls
  1004. call :HEADER "This option installs the SppExtComObjPatcher Hook", " "
  1005. echo:
  1006. wmic path OfficeSoftwareProtectionService get version >nul 2>&1 || set OsppHook=0
  1007.  
  1008. if %win% GEQ 9200 (
  1009. set OSType=Win8
  1010. ) else if %win% GEQ 7600 (
  1011. set OSType=Win7
  1012. ) else (
  1013. goto :UnsupportedVersion
  1014. )
  1015. echo.
  1016. echo Microsoft (R) Windows Software Licensing.
  1017. echo Copyright (C) Microsoft Corporation. All rights reserved.
  1018. call :FOOTER
  1019. IF EXIST "%SystemRoot%\system32\SppExtComObjPatcher.exe" goto :uninst
  1020. :inst
  1021. echo SppExtComObjPatcher will be installed on your computer.
  1022. call :FOOTER
  1023. :run1
  1024. call :StopService sppsvc
  1025. if not "%OsppHook%"=="0" call :StopService osppsvc
  1026. IF ERRORLEVEL 1 echo status: Error
  1027. echo.
  1028. echo Copying Files...
  1029. copy /y "files\SppExtComObjPatcher\%vera%\SppExtComObjPatcher.exe" "%SystemRoot%\system32" >nul
  1030. echo status: OK
  1031. IF ERRORLEVEL 1 echo status: Error
  1032. copy /y "files\SppExtComObjPatcher\%vera%\SppExtComObjHook.dll" "%SystemRoot%\system32" >nul
  1033. echo status: OK
  1034. IF ERRORLEVEL 1 echo status: Error
  1035. echo Creating Registry Entries...
  1036. if %OSType% EQU Win8 (
  1037. echo Creating Registry Entry for SppExtComObj.exe of Windows 8/8.1
  1038. call :CreateIFEOEntry "SppExtComObj.exe"
  1039. )
  1040. if %OSType% EQU Win7 (
  1041. echo Creating Registry Entry for sppsvc.exe of Windows 7
  1042. call :CreateIFEOEntry "sppsvc.exe"
  1043. )
  1044. if not "%OsppHook%"=="0" (
  1045. echo Creating Registry Entry for osppsvc.exe of Office 2010/2013
  1046. call :CreateIFEOEntry "osppsvc.exe"
  1047. )
  1048. goto :end
  1049. :uninst
  1050. echo SppExtComObjPatcher will be removed from your computer.
  1051. call :FOOTER
  1052. :run2
  1053. call :StopService2 sppsvc
  1054. if not "%OsppHook%"=="0" call :StopService2 osppsvc
  1055. echo Removing Installed Files...
  1056. if exist "%SystemRoot%\system32\SppExtComObjPatcher.exe" (
  1057. echo SppExtComObjPatcher.exe Found. Removing...
  1058. del /f /q "%SystemRoot%\system32\SppExtComObjPatcher.exe"
  1059. )
  1060. if exist "%SystemRoot%\system32\SppExtComObjHook.dll" (
  1061. echo SppExtComObjHook.dll Found. Removing...
  1062. del /f /q "%SystemRoot%\system32\SppExtComObjHook.dll"
  1063. )
  1064. echo Removing Registry Entries...
  1065. if %OSType% EQU Win8 (
  1066. echo Removing Registry Entry for SppExtComObj.exe of Windows 8/8.1
  1067. call :RemoveIFEOEntry "SppExtComObj.exe"
  1068. )
  1069. if %OSType% EQU Win7 (
  1070. echo Removing Registry Entry for sppsvc.exe of Windows 7
  1071. call :RemoveIFEOEntry "sppsvc.exe"
  1072. )
  1073. if not "%OsppHook%"=="0" (
  1074. echo Removing Registry Entry for osppsvc.exe of Office 2010/2013
  1075. call :RemoveIFEOEntry "osppsvc.exe"
  1076. )
  1077. schtasks /delete /f /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" >nul 2>&1
  1078. goto :end
  1079. :CreateIFEOEntry
  1080. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Debugger" /t REG_SZ /d "SppExtComObjPatcher.exe" >nul 2>&1
  1081. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_Emulation" /t REG_DWORD /d %KMS_Emulation% >nul 2>&1
  1082. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_ActivationInterval" /t REG_DWORD /d %KMS_ActivationInterval% >nul 2>&1
  1083. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_RenewalInterval" /t REG_DWORD /d %KMS_RenewalInterval% >nul 2>&1
  1084. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2013" /t REG_SZ /d "%Office2013%" >nul 2>&1
  1085. if %~1 NEQ osppsvc.exe (
  1086. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Windows" /t REG_SZ /d "%Windows%" >nul 2>&1
  1087. )
  1088. if %~1 EQU osppsvc.exe (
  1089. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2010" /t REG_SZ /d "%Office2010%" >nul 2>&1
  1090. )
  1091. goto:eof
  1092. :RemoveIFEOEntry
  1093. if %~1 NEQ osppsvc.exe (
  1094. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f >nul 2>&1
  1095. )
  1096. if %~1 EQU osppsvc.exe (
  1097. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Debugger" >nul 2>&1
  1098. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_Emulation" >nul 2>&1
  1099. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_ActivationInterval" >nul 2>&1
  1100. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_RenewalInterval" >nul 2>&1
  1101. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2010" >nul 2>&1
  1102. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2013" >nul 2>&1
  1103. )
  1104. goto:eof
  1105. :StopService
  1106. sc query %~1 | find /i "STOPPED" >nul 2>&1
  1107. if not "%ERRORLEVEL%"=="0" net stop %~1 /y >nul 2>&1
  1108. sc query %~1 | find /i "STOPPED" >nul 2>&1
  1109. if not "%ERRORLEVEL%"=="0" sc stop %~1 >nul 2>&1
  1110. goto:eof
  1111. :StopService2
  1112. sc query %~1 | find /i "RUNNING" >nul 2>&1
  1113. if "%ERRORLEVEL%"=="0" net stop %~1 /y >nul 2>&1
  1114. sc query %~1 | find /i "RUNNING" >nul 2>&1
  1115. if "%ERRORLEVEL%"=="0" sc stop %~1 >nul 2>&1
  1116. goto:eof
  1117. :UnsupportedVersion
  1118. echo ==== ERROR ====
  1119. echo Unsupported OS version Detected.
  1120. echo This project is only supported for Windows 7/8/8.1
  1121. call :FOOTER
  1122. timeout /t 5
  1123. goto:MenuH
  1124. :end
  1125. echo.
  1126. echo Done.
  1127. call :FOOTER
  1128. timeout /t 5
  1129. goto:MenuH
  1130. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1131. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1132. :CynecxInstall
  1133. if not %win% GEQ 9200 call :NotSupported
  1134. if not %win% GEQ 9200 goto:MenuH
  1135. pushd "%~dp0"
  1136. cls
  1137. call :HEADER "This option installs the Hook and Server by CyNecx", " "
  1138. echo:
  1139. set KmsName=Seco
  1140. if exist "%SystemRoot%\System32\%KmsName%" goto:FoundCynecx
  1141. echo:
  1142. if /i "%sai%"=="" set sai=120
  1143. if /i "%sri%"=="" set sri=10080
  1144. echo Host
  1145. echo Default: %host%
  1146. echo:
  1147. echo Interval for unactivated Client in Minutes (15 - 43200)
  1148. echo Default: %sai%
  1149. echo:
  1150. echo Interval for Reactivation in Minutes (15 - 43200)
  1151. echo Default: %sri%
  1152. call :FOOTER
  1153. set /p host=Set host ^>
  1154. set /p sai=Set sai ^>
  1155. set /p sri=Set sri ^>
  1156. echo:
  1157. set secohook="HKLM\SOFTWARE\SECOInjector"
  1158. md "%windir%\system32\Seco"
  1159. xcopy "files\hook\seco\*.*" /s /q "%windir%\system32\Seco" /Y >nul
  1160. reg add %secohook% /f /v "KMS_IP" /d %host% /t "REG_SZ" >nul
  1161. reg add %secohook% /f /v "Enabled" /d "1" /t "REG_DWORD" >nul
  1162. reg add %secohook% /f /v "KMS_Emulation" /d "1" /t "REG_DWORD" >nul
  1163. reg add %secohook% /f /v "KMS_RenewaInterval" /d %sri% /t "REG_DWORD" >nul
  1164. reg add %secohook% /f /v "KMS_ActivationInterval" /d %sai% /t "REG_DWORD" >nul
  1165. call :FOOTER
  1166. CHOICE /C ES /M "Install [E]mulator or [S]ervice ? :"
  1167. if %errorlevel%==1 goto :SecoEmu
  1168. if %errorlevel%==2 goto :SecoSer
  1169. :SecoEmu
  1170. "%windir%\system32\Seco\SECOInjector_%vera%.exe" /s %host% /f /l
  1171. call :TITLE
  1172. call :FOOTER
  1173. timeout /t 3
  1174. goto:MenuH
  1175. :SecoSer
  1176. "%windir%\system32\Seco\SECOInjector_%vera%.exe" /c
  1177. call :TITLE
  1178. call :FOOTER
  1179. timeout /t 3
  1180. goto:MenuH
  1181. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1182. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1183. :CynecxUnInstall
  1184. pushd "%~dp0"
  1185. cls
  1186. call :HEADER "This option uninstalls the Hook and Server by CyNecx", " "
  1187. echo:
  1188. set KmsName=Seco
  1189. if not exist "%SystemRoot%\System32\%KmsName%" goto:NotFoundCynecx
  1190. echo NOTE: If hook uninstall reports error 0x1, uninstall was successful.
  1191. call :FOOTER
  1192. set secohook="HKLM\SOFTWARE\SECOInjector"
  1193. CHOICE /C ES /M "Uninstall [E]mulator or [S]ervice ? :"
  1194. if %errorlevel%==1 goto :SecoEmu1
  1195. if %errorlevel%==2 goto :SecoSer1
  1196. :SecoEmu1
  1197. %windir%\system32\Seco\SECOInjector_%vera%.exe /f /u
  1198. call :TITLE
  1199. reg delete %secohook% /f >nul 2>&1
  1200. if exist "%windir%\system32\Seco" rd /s /q "%windir%\system32\Seco" >nul
  1201. call :FOOTER
  1202. timeout /t 3
  1203. goto:MenuH
  1204. :SecoSer1
  1205. "%windir%\system32\Seco\SECOInjector_%vera%.exe" /r
  1206. call :TITLE
  1207. reg delete %secohook% /f >nul 2>&1
  1208. if exist "%windir%\system32\Seco" rd /s /q "%windir%\system32\Seco" >nul
  1209. call :FOOTER
  1210. timeout /t 3
  1211. goto:MenuH
  1212. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1213. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1214. :FoundCynecx
  1215. echo %KmsName% is already installed.
  1216. call :FOOTER
  1217. timeout /t 3
  1218. goto:MenuH
  1219. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1220. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1221. :NotFoundCynecx
  1222. echo %KmsName% not installed.
  1223. call :FOOTER
  1224. timeout /t 3
  1225. goto:MenuH
  1226. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1227. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1228. :QADInstall
  1229. :: if not %win% GEQ 9200 call :NotSupported
  1230. :: if not %win% GEQ 9200 goto:MenuH
  1231. cls
  1232. call :HEADER "This option installs the Hook and Server by QAD", " "
  1233. echo:
  1234. set Kms1Name=KMS-QADhooker
  1235. if exist "%SystemRoot%\System32\%Kms1Name%.*" goto:FoundH
  1236. call "files\hook\install.cmd"
  1237. pushd "%~dp0"
  1238. goto:MenuH
  1239. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1240. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1241. :QADUnInstall
  1242. cls
  1243. call :HEADER "This option uninstalls the Hook and Server by QAD", " "
  1244. echo:
  1245. set Kms1Name=KMS-QADhooker
  1246. if not exist "%SystemRoot%\System32\%Kms1Name1%.*" goto:NotFoundH
  1247. call "files\hook\uninstall.cmd"
  1248. pushd "%~dp0"
  1249. goto:MenuH
  1250. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1251. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1252. :FoundH
  1253. echo %Kms1Name% is already installed.
  1254. call :FOOTER
  1255. timeout /t 3
  1256. goto:MenuH
  1257. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1258. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1259. :NotFoundH
  1260. echo %Kms1Name% not installed.
  1261. call :FOOTER
  1262. timeout /t 3
  1263. goto:MenuH
  1264. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1265. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1266. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1267. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1268. ::CLIENT EMULATOR SECTION
  1269. :CodyInput
  1270. cls
  1271. set k="files\KMS Client %vera%.exe"
  1272. call :SetClientData
  1273. goto:Menu3
  1274. :-------------------------------------------------------------------------------------------------------
  1275. :HotbirdInput
  1276. cls
  1277. set k="files\KMS-Client.exe"
  1278. call :SetClientData
  1279. goto:Menu3
  1280. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1281. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1282. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1283. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1284. ::CHECK ACTIVATION STATUS
  1285. :CheckActivation
  1286. cls
  1287. set "deleted="
  1288. call :HEADER "Check Windows License Information", " "
  1289. call :CheckSPPSVC
  1290. call :ID
  1291. call :CheckStatusWindows
  1292. echo =Microsoft(R) Windows Software Licensing Version %currentversion%=======================
  1293. echo =Copyright(C) Microsoft Corporation. All rights reserved==============================
  1294. echo Name ^| Arch.: %ver% ^| %vera%
  1295. echo License Channel: %windescription%
  1296. echo Edition: %winname%
  1297. echo Current Build: %currentversion%
  1298. echo BuildLabEx: %build%.%build1%
  1299. echo SKU-ID: %ID%
  1300. echo Product Key: %productkey%
  1301. echo License Status: %status% = %permanent%%license%
  1302. if "%edition%"=="Core" if "%win%"=="9200" set of=30
  1303. if "%edition%"=="ProfessionalWMC" if "%win%"=="9200" set of=30
  1304. if "%edition%"=="Core" if "%win%"=="9600" set of=45
  1305. if "%edition%"=="ProfessionalWMC" if "%win%"=="9600" set of=45
  1306. if not defined of set of=180
  1307. set /a "grace2=%grace1%/60" >nul 2>&1
  1308. set /a "grace3=%grace1%/60/24" >nul 2>&1
  1309. echo Graceperiod: %grace1% mins = %grace2% hrs = %grace3% / %of% days
  1310. echo Rearms: %r%
  1311. echo KMS Host ePID: %kmsepid%
  1312. echo KMS Host Adress: %kmsIP% Port:%kmsport%
  1313. call :FOOTER
  1314. pause
  1315. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1316. :CheckOffice16
  1317. call :CheckC2ROx64 16, 3, Common, office
  1318. call :CheckC2RPx64 16, 3, Project, project
  1319. call :CheckC2RVx64 16, 3, Visio, visio
  1320. if not defined office16present if not defined project16present if not defined visio16present goto:CheckOffice16x86
  1321. if defined office16present if %win% geq 9200 (call :CheckStatusOffice "%slp%", Office16ProPlus, O3) else (call :CheckStatusOffice "%ospp%", Office16ProPlus, O3)
  1322. if defined project16present if %win% geq 9200 (call :CheckStatusOthers "%slp%", Office16ProjectPro, O4) else (call :CheckStatusOthers "%ospp%", Office16ProjectPro, O4)
  1323. if defined visio16present if %win% geq 9200 (call :CheckStatusOthers "%slp%", Office16VisioPro, O5) else (call :CheckStatusOthers "%ospp%", Office16VisioPro, O5)
  1324. goto :showoffice16
  1325. :CheckOffice16x86
  1326. call :CheckC2ROx86 16, 3, Common, office
  1327. call :CheckC2RPx86 16, 3, Project, project
  1328. call :CheckC2RVx86 16, 3, Visio, visio
  1329. if not defined office16present if not defined project16present if not defined visio16present goto:CheckOffice15
  1330. if defined office16present if %win% geq 9200 (call :CheckStatusOffice "%slp%", Office16ProPlus, O3) else (call :CheckStatusOffice "%ospp%", Office16ProPlus, O3)
  1331. if defined project16present if %win% geq 9200 (call :CheckStatusOthers "%slp%", Office16ProjectPro, O4) else (call :CheckStatusOthers "%ospp%", Office16ProjectPro, O4)
  1332. if defined visio16present if %win% geq 9200 (call :CheckStatusOthers "%slp%", Office16VisioPro, O5) else (call :CheckStatusOthers "%ospp%", Office16VisioPro, O5)
  1333. :showoffice16
  1334. cls
  1335. if defined office16present if %win% geq 9200 (call :OID "%slp%", Office16ProPlus) else (call :OID "%ospp%", Office16ProPlus)
  1336. call :HEADER "Check Office 16 License Information", "%prodrelid%"
  1337. if not defined office16present if not defined project16present goto :showVisio16
  1338. if not defined office16present goto :showProject16
  1339. echo =Microsoft(R) Office 16 Software Licensing Version %currentversion%=====================
  1340. echo =Copyright(C) Microsoft Corporation. All rights reserved==============================
  1341. echo Name: %NAO3%
  1342. echo ActivationID: %oid%
  1343. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO3%
  1344. echo Install Path: %officepath3%
  1345. if "%officestatus%"=="1" set "O16license=^< LICENSED ^>"
  1346. if "%officestatus%"=="2" set "O16license=^< OOB GRACE ^>"
  1347. if "%officestatus%"=="3" set "O16license=^< OOT GRACE ^>"
  1348. if "%officestatus%"=="5" set "O16license=^< NOTIFICATION ^>"
  1349. echo License Status: %officestatus% = %O16license%
  1350. set /a "GraPeO12=%GraPeO3%/60" >nul 2>&1
  1351. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1352. set ofo=180
  1353. echo Graceperiod: %GraPeO3% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1354. if defined orearm echo Rearms: %orearm%
  1355. echo KMS Host ePID: %HostNaO3%
  1356. echo KMS Host Adress: %KIPO3% Port:%KPO3%
  1357. call :SHORTFOOTER
  1358. if not defined project16present if not defined visio16present (pause)&&(goto :CheckOffice15)
  1359. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1360. :showProject16
  1361. if %win% geq 9200 call :POID "%slp%", Office16ProjectPro
  1362. if %win% lss 9200 call :POID "%ospp%", Office16ProjectPro
  1363. echo =Microsoft(R) Office 16 Software Licensing Version %currentversion%=====================
  1364. echo =Copyright(C) Microsoft Corporation. All rights reserved==============================
  1365. echo Name: %NAO4%
  1366. echo ActivationID: %poid%
  1367. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO4%
  1368. echo Install Path: %officepath3%
  1369. if "%otherstatus%"=="1" set "O16license=^< LICENSED ^>"
  1370. if "%otherstatus%"=="2" set "O16license=^< OOB GRACE ^>"
  1371. if "%otherstatus%"=="3" set "O16license=^< OOT GRACE ^>"
  1372. if "%otherstatus%"=="5" set "O16license=^< NOTIFICATION ^>"
  1373. echo License Status: %otherstatus% = %O16license%
  1374. set /a "GraPeO12=%GraPeO4%/60" >nul 2>&1
  1375. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1376. set ofo=180
  1377. echo Graceperiod: %GraPeO4% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1378. if defined orearm echo Rearms: %orearm%
  1379. echo KMS Host ePID: %HostNaO4%
  1380. echo KMS Host Adress: %KIPO4% Port:%KPO4%
  1381. call :SHORTFOOTER
  1382. if not defined visio16present (pause)&&(goto :CheckOffice15)
  1383. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1384. :showVisio16
  1385. if %win% geq 9200 (call :POID "%slp%", Office16VisioPro) else (call :POID "%ospp%", Office16VisioPro)
  1386. echo =Microsoft(R) Office 16 Software Licensing Version %currentversion%=====================
  1387. echo =Copyright(C) Microsoft Corporation. All rights reserved==============================
  1388. echo Name: %NAO5%
  1389. echo ActivationID: %poid%
  1390. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO5%
  1391. echo Install Path: %officepath3%
  1392. if "%otherstatus%"=="1" set "O16license=^< LICENSED ^>"
  1393. if "%otherstatus%"=="2" set "O16license=^< OOB GRACE ^>"
  1394. if "%otherstatus%"=="3" set "O16license=^< OOT GRACE ^>"
  1395. if "%otherstatus%"=="5" set "O16license=^< NOTIFICATION ^>"
  1396. echo License Status: %otherstatus% = %O16license%
  1397. set /a "GraPeO12=%GraPeO5%/60" >nul 2>&1
  1398. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1399. set ofo=180
  1400. echo Graceperiod: %GraPeO5% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1401. if defined orearm echo Rearms: %orearm%
  1402. echo KMS Host ePID: %HostNaO5%
  1403. echo KMS Host Adress: %KIPO5% Port:%KPO5%
  1404. call :SHORTFOOTER
  1405. pause
  1406. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1407. :CheckOffice15
  1408. set "officepath2="
  1409. call :Officex64 15, 2
  1410. call :Othersx64 15, 2, Project, project
  1411. call :Othersx64 15, 2, Visio, visio
  1412. if not defined office15present if not defined project15present if not defined visio15present goto:CheckOffice15x86
  1413. if defined office15present if %win% geq 9200 (call :CheckStatusOffice "%slp%", OfficeProPlus, O) else (call :CheckStatusOffice "%ospp%", OfficeProPlus, O)
  1414. if defined project15present if %win% geq 9200 (call :CheckStatusOthers "%slp%", OfficeProjectPro, O4) else (call :CheckStatusOthers "%ospp%", OfficeProjectPro, O4)
  1415. if defined visio15present if %win% geq 9200 (call :CheckStatusOthers "%slp%", OfficeVisioPro, O5) else (call :CheckStatusOthers "%ospp%", OfficeVisioPro, O5)
  1416. goto :showoffice15
  1417. :CheckOffice15x86
  1418. call :Officex86 15, 2
  1419. call :Othersx86 15, 2, Project, project
  1420. call :Othersx86 15, 2, Visio, visio
  1421. if not defined office15present if not defined project15present if not defined visio15present goto:CheckOffice14
  1422. if defined office15present if %win% geq 9200 (call :CheckStatusOffice "%slp%", OfficeProPlus, O) else (call :CheckStatusOffice "%ospp%", OfficeProPlus, O)
  1423. if defined project15present if %win% geq 9200 (call :CheckStatusOthers "%slp%", OfficeProjectPro, O4) else (call :CheckStatusOthers "%ospp%", OfficeProjectPro, O4)
  1424. if defined visio15present if %win% geq 9200 (call :CheckStatusOthers "%slp%", OfficeVisioPro, O5) else (call :CheckStatusOthers "%ospp%", OfficeVisioPro, O5)
  1425. :showoffice15
  1426. if defined office15present if %win% geq 9200 (call :OID "%slp%", OfficeProPlus) else (call :OID "%ospp%", OfficeProPlus)
  1427. cls
  1428. call :HEADER "Check Office 15 License Information", " "
  1429. if not defined office15present if not defined project15present goto :showVisio15
  1430. if not defined office15present goto :showProject15
  1431. echo =Microsoft Office 15 Software Licensing Version %currentversion%=====================
  1432. echo =Copyright Microsoft Corporation. All rights reserved==============================
  1433. echo Name: %NAO%
  1434. echo ActivationID: %oid%
  1435. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO%
  1436. echo Install Path: %officepath2%
  1437. if "%officestatus%"=="1" set "O15license=^< LICENSED ^>"
  1438. if "%officestatus%"=="2" set "O15license=^< OOB GRACE ^>"
  1439. if "%officestatus%"=="3" set "O15license=^< OOT GRACE ^>"
  1440. if "%officestatus%"=="5" set "O15license=^< NOTIFICATION ^>"
  1441. echo License Status: %officestatus% = %O15license%
  1442. set /a "GraPeO12=%GraPeO%/60" >nul 2>&1
  1443. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1444. set ofo=180
  1445. echo Graceperiod: %GraPeO% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1446. if defined orearm echo Rearms: %orearm%
  1447. echo KMS Host ePID: %HostNaO%
  1448. echo KMS Host Adress: %KIPO% Port:%KPO%
  1449. call :SHORTFOOTER
  1450. if not defined project15present if not defined visio15present (pause)&&(goto :CheckOffice14)
  1451. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1452. :showProject15
  1453. if %win% geq 9200 (call :POID "%slp%", OfficeProjectPro) else (call :POID "%ospp%", OfficeProjectPro)
  1454. echo =Microsoft Office 15 Software Licensing Version %currentversion%=====================
  1455. echo =Copyright Microsoft Corporation. All rights reserved==============================
  1456. echo Name: %NAO4%
  1457. echo ActivationID: %poid%
  1458. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO4%
  1459. echo Install Path: %officepath2%
  1460. if "%otherstatus%"=="1" set "O15license=^< LICENSED ^>"
  1461. if "%otherstatus%"=="2" set "O15license=^< OOB GRACE ^>"
  1462. if "%otherstatus%"=="3" set "O15license=^< OOT GRACE ^>"
  1463. if "%otherstatus%"=="5" set "O15license=^< NOTIFICATION ^>"
  1464. echo License Status: %otherstatus% = %O15license%
  1465. set /a "GraPeO12=%GraPeO4%/60" >nul 2>&1
  1466. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1467. set ofo=180
  1468. echo Graceperiod: %GraPeO4% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1469. if defined orearm echo Rearms: %orearm%
  1470. echo KMS Host ePID: %HostNaO4%
  1471. echo KMS Host Adress: %KIPO4% Port:%KPO4%
  1472. call :SHORTFOOTER
  1473. if not defined visio15present (pause)&&(goto :CheckOffice14)
  1474. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1475. :showVisio15
  1476. if %win% geq 9200 (call :POID "%slp%", OfficeVisioPro) else (call :POID "%ospp%", OfficeVisioPro)
  1477. echo =Microsoft Office 15 Software Licensing Version %currentversion%=====================
  1478. echo =Copyright Microsoft Corporation. All rights reserved==============================
  1479. echo Name: %NAO5%
  1480. echo ActivationID: %poid%
  1481. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO5%
  1482. echo Install Path: %officepath2%
  1483. if "%otherstatus%"=="1" set "O15license=^< LICENSED ^>"
  1484. if "%otherstatus%"=="2" set "O15license=^< OOB GRACE ^>"
  1485. if "%otherstatus%"=="3" set "O15license=^< OOT GRACE ^>"
  1486. if "%otherstatus%"=="5" set "O15license=^< NOTIFICATION ^>"
  1487. echo License Status: %otherstatus% = %O15license%
  1488. set /a "GraPeO12=%GraPeO5%/60" >nul 2>&1
  1489. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1490. set ofo=180
  1491. echo Graceperiod: %GraPeO5% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1492. if defined orearm echo Rearms: %orearm%
  1493. echo KMS Host ePID: %HostNaO5%
  1494. echo KMS Host Adress: %KIPO5% Port:%KPO5%
  1495. call :SHORTFOOTER
  1496. pause
  1497. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1498. :CheckOffice14
  1499. call :Officex64 14, 1
  1500. call :Othersx64 14, 1, Project, project
  1501. call :Othersx64 14, 1, Visio, visio
  1502. if not defined office14present if not defined project14present if not defined visio14present goto:CheckOffice14x86
  1503. if defined office14present call :CheckStatusOffice "%ospp%", OfficeProPlus, O2
  1504. if defined project14present call :CheckStatusOthers "%ospp%", OfficeProjectPro, O4
  1505. if defined visio14present call :CheckStatusOthers "%ospp%", OfficeVisioPro, O5
  1506. goto :showOffice14
  1507. :CheckOffice14x86
  1508. call :Officex86 14, 1
  1509. call :Othersx86 14, 1, Project, project
  1510. call :Othersx86 14, 1, Visio, visio
  1511. if not defined office14present if not defined project14present if not defined visio14present goto:MenuA
  1512. if defined office14present call :CheckStatusOffice "%ospp%", OfficeProPlus, O2
  1513. if defined project14present call :CheckStatusOthers "%ospp%", OfficeVisioPro, O5
  1514. if defined visio14present call :CheckStatusOthers "%ospp%", OfficeVisioPro, O5
  1515. :showOffice14
  1516. if defined office14present call :OID "%ospp%", OfficeProPlus
  1517. cls
  1518. call :HEADER "Check Office 14 License Information", " "
  1519. if not defined office14present if not defined project14present goto :showVisio14
  1520. if not defined office14present goto :showProject14
  1521. echo =Microsoft(R) Office 14 Software Licensing Version %currentversion%=====================
  1522. echo =Copyright(C) Microsoft Corporation. All rights reserved==============================
  1523. echo Name: %NAO2%
  1524. echo ActivationID: %oid%
  1525. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO2%
  1526. echo Install Path: %officepath1%
  1527. if "%officestatus%"=="1" set "O14license=^< LICENSED ^>"
  1528. if "%officestatus%"=="2" set "O14license=^< OOB GRACE ^>"
  1529. if "%officestatus%"=="3" set "O14license=^< OOT GRACE ^>"
  1530. if "%officestatus%"=="5" set "O14license=^< NOTIFICATION ^>"
  1531. echo License Status: %officestatus% = %O14license%
  1532. set /a "GraPeO21=%GraPeO2%/60" >nul 2>&1
  1533. set /a "GraPeO22=%GraPeO21%/24" >nul 2>&1
  1534. set ofo=180
  1535. echo Graceperiod: %GraPeO2% mins = %GraPeO21% hrs = %GraPeO22% / %ofo% days
  1536. if not defined HostNaO2 set "deleted=(empty)"
  1537. echo KMS Host ePID: %HostNaO2%
  1538. if not defined KIPO2 set "deleted=(empty)"
  1539. echo KMS Host Adress: %KIPO2% Port:%KPO2%
  1540. call :SHORTFOOTER
  1541. if not defined project14present if not defined visio14present (pause)&&(goto :MenuA)
  1542. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1543. :showProject14
  1544. if %win% geq 9200 (call :POID "%slp%", OfficeProjectPro) else (call :POID "%ospp%", OfficeProjectPro)
  1545. echo =Microsof4(R) Office 14 Software Licensing Version %currentversion%=====================
  1546. echo =Copyright(C) Microsoft Corporation. All rights reserved==============================
  1547. echo Name: %NAO4%
  1548. if not defined KeyPaO4 set "cleared=(cleared)"
  1549. echo ActivationID: %poid%
  1550. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO4%
  1551. echo Install Path: %officepath1%
  1552. if "%othersstatus%"=="1" set "O14license=^< LICENSED ^>"
  1553. if "%othersstatus%"=="2" set "O14license=^< OOB GRACE ^>"
  1554. if "%othersstatus%"=="3" set "O14license=^< OOT GRACE ^>"
  1555. if "%othersstatus%"=="5" set "O14license=^< NOTIFICATION ^>"
  1556. echo License Status: %otherstatus% = %O14license%
  1557. set /a "GraPeO12=%GraPeO4%/60" >nul 2>&1
  1558. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1559. set ofo=180
  1560. echo Graceperiod: %GraPeO4% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1561. if defined orearm echo Rearms: %orearm%
  1562. if not defined HostNaO4 set "deleted=(empty)"
  1563. echo KMS Host ePID: %HostNaO4%
  1564. if not defined KIPO4 set "deleted=(empty)"
  1565. echo KMS Host Adress: %KIPO4% Port:%KPO4%
  1566. call :SHORTFOOTER
  1567. if not defined visio14present (pause)&&(goto :MenuA)
  1568. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1569. :showVisio14
  1570. if %win% geq 9200 (call :POID "%slp%", OfficeVisioPro) else (call :POID "%ospp%", OfficeVisioPro)
  1571. echo =Microsof4^(R^) Office 14 Software Licensing Version %currentversion%=====================
  1572. echo =Copyright^(C^) Microsoft Corporation. All rights reserved==============================
  1573. echo Name: %NAO5%
  1574. echo ActivationID: %poid%
  1575. echo Key Part: XXXXX-XXXXX-XXXXX-XXXXX-%PaKeyO5%
  1576. echo Install Path: %officepath1%
  1577. if "%othersstatus%"=="1" set "O14license=^< LICENSED ^>"
  1578. if "%othersstatus%"=="2" set "O14license=^< OOB GRACE ^>"
  1579. if "%othersstatus%"=="3" set "O14license=^< OOT GRACE ^>"
  1580. if "%othersstatus%"=="5" set "O14license=^< NOTIFICATION ^>"
  1581. echo License Status: %otherstatus% = %O14license%
  1582. set /a "GraPeO12=%GraPeO5%/60" >nul 2>&1
  1583. set /a "GraPeO22=%GraPeO12%/24" >nul 2>&1
  1584. set ofo=180
  1585. echo Graceperiod: %GraPeO5% mins = %GraPeO12% hrs = %GraPeO22% / %ofo% days
  1586. if defined orearm echo Rearms: %orearm%
  1587. echo KMS Host ePID: %HostNaO5%
  1588. echo KMS Host Adress: %KIPO5% Port:%KPO5%
  1589. call :SHORTFOOTER
  1590. pause
  1591. goto:MenuA
  1592. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1593. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1594. :CheckInstall
  1595. cls
  1596. call :HEADER "This option checks if Service is installed", " "
  1597. echo:
  1598. if /i "%name%"=="" set name=KMSServer
  1599. if exist "%windir%\%nam1e%\%name%.exe.config" goto :nextCIE4
  1600. reg query "HKLM\SYSTEM\CurrentControlSet\services\%name%\Parameters" >nul 2>&1
  1601. if "%errorlevel%"=="0" goto :nextCIE1
  1602. reg query "HKLM\SYSTEM\CurrentControlSet\services\KMS\Parameters" >nul 2>&1
  1603. if "%errorlevel%"=="0" goto :nextCIE2
  1604. if "%errorlevel%"=="1" goto :nextCIE3
  1605. :nextCIE1
  1606. for /F "tokens=3 delims= " %%A in ('reg query "HKLM\SYSTEM\CurrentControlSet\services\%name%\Parameters" /v *Port ^| findstr "Port"') do set sport=%%A
  1607. goto :nextCIE3
  1608. :nextCIE2
  1609. for /F "tokens=3 delims= " %%A in ('reg query "HKLM\SYSTEM\CurrentControlSet\services\KMS\Parameters" /v Port') do set sport=%%A
  1610. echo:
  1611. echo Default: %name%
  1612. echo Values: Servername
  1613. call :FOOTER
  1614. set /p name=Set name ^>
  1615. echo:
  1616. set file=%temp%\h2d.vbs
  1617. echo hexstring = "%sport:~2%" > %file%
  1618. echo myNumber = CInt("&H" ^& hexstring) >> %file%
  1619. echo WScript.StdOut.Write myNumber >> %file%
  1620. FOR /F %%A in ('cscript /nologo %file%') do SET dport=%%A
  1621. del /s /q %file% >nul
  1622. if "%dport:~0,1%"=="-" goto :nextCIE5
  1623. goto :nextCIE6
  1624. :nextCIE5
  1625. set file=%temp%\h2d.vbs
  1626. echo hexstring = "%sport:~2%" > %file%
  1627. echo myNumber = CLng("&H" ^& hexstring) >> %file%
  1628. echo WScript.StdOut.Write myNumber >> %file%
  1629. FOR /F %%A in ('cscript /nologo %file%') do SET dport=%%A
  1630. del /s /q %file% >nul
  1631. :nextCIE6
  1632. sc query %name% >NUL
  1633. if errorlevel 1 goto :Message
  1634. if errorlevel 0 echo: && echo Service is already installed using port %dport% (%sport%)
  1635. call :FOOTER
  1636. pause
  1637. goto :MenuA
  1638. :nextCIE4
  1639. for /f "tokens=3 delims=>/<" %%a in ('type %windir%\%name%\%name%.exe.config ^|find "value"') do (
  1640. set "sport=%%a"
  1641. goto :nextCIE3
  1642. )
  1643. :nextCIE3
  1644. echo Default: %name%
  1645. echo Values: Servername
  1646. echo:
  1647. set /p name=Set name ^>
  1648. echo:
  1649. sc query %name% >NUL
  1650. if errorlevel 1 goto :Message
  1651. if errorlevel 0 echo: && echo Service is already installed using port %sport%
  1652. call :FOOTER
  1653. timeout /t 5
  1654. goto:MenuA
  1655. :Message
  1656. echo:
  1657. echo ...Service is not installed.
  1658. call :FOOTER
  1659. timeout /t 5
  1660. goto:MenuA
  1661. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1662. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1663. :CheckEmulator
  1664. color 0F
  1665. cls
  1666. call :HEADER "This option checks for KMS Server Emulator", " "
  1667. echo:
  1668. echo ...Checking for Server Emulator instances:
  1669. echo:
  1670. wmic process where "name='KMSServer.exe'" | findstr /i /c:"KMSServer.exe" >nul
  1671. if %errorlevel%==0 goto :ServerRunningCE
  1672. if %errorlevel%==1 goto :ServerNotRunningCE
  1673. :ServerRunningCE
  1674. echo:
  1675. echo KMS Emulator is already running...
  1676. call :FOOTER
  1677. timeout /t 5
  1678. goto:MenuA
  1679. :ServerNotRunningCE
  1680. echo:
  1681. echo KMS Emulator is not running...
  1682. call :FOOTER
  1683. timeout /t 5
  1684. goto:MenuA
  1685. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1686. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1687. :CheckRealHost
  1688. cls
  1689. call :HEADER "This option checks a real Windows KMS Host", " "
  1690. echo:
  1691. cscript "%windir%\system32\slmgr.vbs" /dlv
  1692. call :FOOTER
  1693. pause
  1694. cls
  1695. call :HEADER "This option checks a real Office 14 KMS Host", " "
  1696. echo:
  1697. cscript "%windir%\system32\slmgr.vbs" /dlv bfe7a195-4f8f-4f0b-a622-cf13c7d16864
  1698. call :FOOTER
  1699. pause
  1700. cls
  1701. call :HEADER "This option checks a real Office 15 KMS Host", " "
  1702. echo:
  1703. cscript "%windir%\system32\slmgr.vbs" /dlv 2e28138a-847f-42bc-9752-61b03fff33cd
  1704. call :FOOTER
  1705. pause
  1706. goto:MenuA
  1707. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1708. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1709. :Ipconfig
  1710. cls
  1711. call :HEADER "This option checks IPv4 adress of %computername%", " "
  1712. echo:
  1713. for /f "skip=1 tokens=2 delims=[]" %%i in ('ping %computername% -4 -n 1') do set ip4=%%i
  1714. echo Current IPv4 adress: %ip4%
  1715. call :FOOTER
  1716. pause
  1717. goto:MenuA
  1718. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1719. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1720. :CheckPortUsage
  1721. cls
  1722. call :HEADER "This option checks if Port is in use", " "
  1723. echo:
  1724. if /i "%port%"=="" set "port=1688"
  1725. if /i "%name%"=="" set name=KMSServer
  1726. echo Port
  1727. echo Default: %port%
  1728. echo:
  1729. echo Name
  1730. echo Default: %name%
  1731. echo:
  1732. set /p port=Set Port ^>
  1733. set /p name=Set Name ^>
  1734. for /F "tokens=5 delims= " %%P in ('netstat -a -n -o ^| findstr /RC:":%port%"') do set serverPid=%%P
  1735. if "%serverPid%"=="" goto :NotUsedCP
  1736. for /F "tokens=1 delims= " %%A in ('tasklist ^| findstr "%serverPid%"') do set servername=%%~nA
  1737. if not "%serverPid%"=="" goto :UsedCP
  1738. :NotUsedCP
  1739. echo:
  1740. echo Port %port% is currently not in use.
  1741. call :FOOTER
  1742. CHOICE /C YN /M "Check for %name% [Y]es or [N]o : "
  1743. if %errorlevel%==1 (
  1744. call :CheckInstall
  1745. goto:MenuA
  1746. )
  1747. if %errorlevel%==2 goto:MenuA
  1748. :UsedCP
  1749. echo:
  1750. echo Port is used by: %servername% with PID: %serverPid%
  1751. if "%servername%"=="%name%" goto :ChoiceCPU
  1752. call :FOOTER
  1753. pause
  1754. goto:MenuA
  1755. :ChoiceCPU
  1756. call :FOOTER
  1757. CHOICE /C YN /M "Uninstall %servername% [Y]es or [N]o : "
  1758. if %errorlevel%==1 (
  1759. call :Uninstall
  1760. goto:MenuA
  1761. )
  1762. if %errorlevel%==2 goto:MenuA
  1763. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1764. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1765. :RestartService
  1766. cls
  1767. call :HEADER "This option restarts KMS Server Service", " "
  1768. echo:
  1769. if /i "%name%"=="" set name=KMSServer
  1770. echo Default: %name%
  1771. echo Values: Servername
  1772. call :FOOTER
  1773. set /p name=Set name ^>
  1774. echo:
  1775. sc query %name% >nul
  1776. if errorlevel 1 (
  1777. call :NotInstalled
  1778. goto:MenuA
  1779. )
  1780. pushd "%~dp0"
  1781. net stop %name% >nul
  1782. if %errorlevel% equ 0 echo Successfully started %name%.
  1783. if %errorlevel% neq 0 echo Starting %name% Failed.
  1784. echo:
  1785. net start %name% >nul
  1786. if %errorlevel% equ 0 echo Successfully started %name%.
  1787. if %errorlevel% neq 0 echo Starting %name% Failed.
  1788. call :FOOTER
  1789. echo:
  1790. timeout /t 5
  1791. goto:MenuA
  1792. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1793. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1794. :HaltService
  1795. cls
  1796. call :HEADER "This option halts KMS Server Service", " "
  1797. echo:
  1798. if /i "%name%"=="" set name=KMSServer
  1799. echo Default: %name%
  1800. echo Values: Servername
  1801. call :FOOTER
  1802. set /p name=Set name ^>
  1803. echo:
  1804. sc query %name% >nul
  1805. if errorlevel 1 (
  1806. call :NotInstalled
  1807. goto:MenuA
  1808. )
  1809. net stop %name% >nul
  1810. if %errorlevel% equ 0 echo Successfully started %name%.
  1811. if %errorlevel% neq 0 echo Starting %name% Failed.
  1812. call :FOOTER
  1813. timeout /t 5
  1814. goto:MenuA
  1815. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1816. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1817. :StartService
  1818. cls
  1819. call :HEADER "This option starts KMS Server Service ", " "
  1820. echo:
  1821. if /i "%name%"=="" set name=KMSServer
  1822. echo Default: %name%
  1823. echo:
  1824. echo Values: Servername
  1825. call :FOOTER
  1826. set /p name=Set name ^>
  1827. echo:
  1828. sc query %name% >nul
  1829. if errorlevel 1 (
  1830. call :NotInstalled
  1831. goto:MenuA
  1832. )
  1833. echo:
  1834. net start %name% >nul
  1835. if %errorlevel% equ 0 echo Successfully started %name%.
  1836. if %errorlevel% neq 0 echo Starting %name% Failed.
  1837. call :FOOTER
  1838. timeout /t 5
  1839. goto:Menu2
  1840. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1841. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1842. :ClearLogs
  1843. cls
  1844. call :HEADER "CLEARING LOGS", " "
  1845. echo Clearing all Logs ...
  1846. for /f "delims=," %%i in ( 'wevtutil el' ) do wevtutil cl "%%i"
  1847. wevtutil.exe cl System
  1848. call :FOOTER
  1849. timeout /t 5
  1850. goto:MenuA
  1851. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1852. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1853. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1854. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1855. ::SYSTEM ACTIVATION SECTION
  1856. :Activate
  1857. cls
  1858. call :CheckSPPSVC
  1859. for /d %%a in (RETAIL, OEM, OEM_SLP, OEM_NONSLP, OEM_COA, OEM_DM, VOLUME_MAK, VOLUME_KMS) do if "%channel%"=="%%a" if "%status%"=="1" (
  1860. call :Detected %%a
  1861. goto:Menu5
  1862. )
  1863. call :ID
  1864. call :HEADER "OS-Version: %ver% found %vera%", "ID: %id%"
  1865. echo:
  1866. if %win% lss 9200 set host=127.0.0.2
  1867. if /i "%port%"=="" set "port=1688"
  1868. echo Default: %host%
  1869. echo Value: Host Adress
  1870. echo:
  1871. echo Default: %port%
  1872. echo Value: Host Port
  1873. call :FOOTER
  1874. set /p host=Set host IP ^>
  1875. set /p port=Set port ^>
  1876. call :FOOTER
  1877. pushd "%~dp0"
  1878. wmic path %sls% where version='%version%' call SetKeyManagementServiceMachine MachineName="%host%" >nul
  1879. if %errorlevel% equ 0 echo Successfully changed IP to %host%.
  1880. if %errorlevel% neq 0 echo Setting IP to %host% Failed.
  1881. wmic path %sls% where version='%version%' call SetKeyManagementServicePort %port% >nul
  1882. if %errorlevel% equ 0 echo Successfully changed Port to %port%. & echo:
  1883. if %errorlevel% neq 0 echo Setting Port to %port% Failed.
  1884. wmic path %slp% where ID='%id%' call Activate >nul
  1885. if %errorlevel% equ 0 echo: & echo Successfully activated: %ver% %vera%
  1886. if %errorlevel% neq 0 echo Activation Failed. No Host available.
  1887. call :FOOTER
  1888. wmic path %sls% where version='%version%' call ClearKeyManagementServiceMachine >nul
  1889. wmic path %sls% where version='%version%' call ClearKeyManagementServicePort >nul
  1890. wmic path %sls% where version='%version%' call DisableKeyManagementServiceDnsPublishing 1 >nul
  1891. wmic path %sls% where version='%version%' call DisableKeyManagementServiceHostCaching 1 >nul
  1892. pause
  1893. goto:Menu5
  1894. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1895. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1896. :Detected
  1897. call :HEADER "%~1 found...", " "
  1898. echo:
  1899. CHOICE /C AB /N /M "[A]ctivate Online or [B]ack ?"
  1900. if %errorlevel%==1 (
  1901. call :ActivateOnline
  1902. goto:Menu5
  1903. )
  1904. if %errorlevel%==2 goto:Menu5
  1905. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1906. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1907. :ActivateOffice
  1908. call :Office14
  1909. :ActivateOffice3
  1910. call :Office1464
  1911. :ActivateOffice4
  1912. call :Office15
  1913. :ActivateOffice5
  1914. call :Office1564
  1915. :ActivateOffice6
  1916. call :Office16
  1917. :ActivateOffice7
  1918. call :Office1664
  1919. goto:Menu5
  1920. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1921. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1922. :ConvertOffice
  1923. call :Officex64 15, 2
  1924. call :Othersx64 15, 2, Project, project
  1925. call :Othersx64 15, 2, Visio, visio
  1926. if not defined office15present if not defined project15present if not defined visio15present goto:ConvertOffice2
  1927. call :HEADER "Office 2013 Professional Plus %vera% found", "in path: %officepath2%"
  1928. CHOICE /C PB /M "[P]roceed or [B]ack ? :"
  1929. if %errorlevel%==2 goto:Menu5
  1930. call :Office15ConversionLoop
  1931. timeout /t 5
  1932. :ConvertOffice2
  1933. cls
  1934. call :Officex86 15, 2
  1935. call :Othersx86 15, 2, Project, project
  1936. call :Othersx86 15, 2, Visio, visio
  1937. if not defined office15present if not defined project15present if not defined visio15present goto:ConvertOffice3
  1938. call :HEADER "Office 2013 Professional Plus x86 found", "in path: %officepath2%"
  1939. CHOICE /C PB /M "[P]roceed or [B]ack ? :"
  1940. if %errorlevel%==2 goto:Menu5
  1941. call :Office15ConversionLoop
  1942. timeout /t 5
  1943. :ConvertOffice3
  1944. cls
  1945. call :CheckC2ROx64 16, 3, Common, office
  1946. call :CheckC2RPx64 16, 3, Project, project
  1947. call :CheckC2RVx64 16, 3, Visio, visio
  1948. if not defined office16present if not defined project16present if not defined visio16present goto:ConvertOffice4
  1949. call :HEADER "Office 2016 Professional Plus %vera% found", "in path: %officepath3%"
  1950. CHOICE /C PB /M "[P]roceed or [B]ack ? :"
  1951. if %errorlevel%==2 goto:Menu5
  1952. call :Office16ConversionLoop "%ProgramFiles%"
  1953. timeout /t 5
  1954. :ConvertOffice4
  1955. cls
  1956. call :CheckC2ROx86 16, 3, Common, office
  1957. call :CheckC2RPx86 16, 3, Project, project
  1958. call :CheckC2RVx86 16, 3, Visio, visio
  1959. if not defined office16present if not defined project16present if not defined visio16present goto:Menu5
  1960. call :HEADER "Office 2016 Professional Plus x86 found", "in path: %officepath3%"
  1961. CHOICE /C PB /M "[P]roceed or [B]ack ? :"
  1962. if %errorlevel%==2 goto:Menu5
  1963. call :Office16ConversionLoop "%ProgramFiles(x86)%"
  1964. timeout /t 5
  1965. goto:Menu5
  1966. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1967. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1968. :UninstallOffice
  1969. call :Officex64 14, 1
  1970. call :Othersx64 14, 1, Project, project
  1971. call :Othersx64 14, 1, Visio, visio
  1972. if not defined office14present if not defined project14present if not defined visio14present goto:UninstallOffice2
  1973. call :HEADER "Office 2010 Professional Plus %vera% found", "in path: %officepath1%"
  1974. CHOICE /C PB /M "[P]roceed or [B]ack ? :"
  1975. if %errorlevel%==2 goto:UninstallOffice2
  1976. start cmd /k cscript "%officepath1%\ospp.vbs" /dstatus
  1977. echo Keypart^(s^): 'XXXXX' or 'XXXXX, XXXXX, XXXXX, ...'
  1978. call :FOOTER
  1979. set /p keypart=Set Keypart:
  1980. cls
  1981. call :HEADER " UNINSTALLING : %keypart%"
  1982. for /d %%a in (%keypart%) do csccript "%officepath1%\ospp.vbs" /unpkey:%%a
  1983. call :FOOTER
  1984. pause
  1985. timeout /t 5
  1986. :UninstallOffice2
  1987. cls
  1988. call :Officex86 14, 1
  1989. call :Othersx86 14, 1, Project, project
  1990. call :Othersx86 14, 1, Visio, visio
  1991. if not defined office14present if not defined project14present if not defined visio14present goto:UninstallOffice3
  1992. call :HEADER "Office 2010 Professional Plus x86 found", "in path: %officepath1%"
  1993. CHOICE /C PB /M "[P]roceed or [B]ack ? :"
  1994. if %errorlevel%==2 goto:UninstallOffice3
  1995. start cmd /k cscript "%officepath1%\ospp.vbs" /dstatus
  1996. echo Keypart^(s^): 'XXXXX' or 'XXXXX, XXXXX, XXXXX, ...'
  1997. call :FOOTER
  1998. set /p keypart=Set Keypart:
  1999. cls
  2000. call :HEADER " UNINSTALLING : %keypart%"
  2001. for /d %%a in (%keypart%) do cscript "%officepath1%\ospp.vbs" /unpkey:%%a
  2002. call :FOOTER
  2003. pause
  2004. timeout /t 5
  2005. :UninstallOffice3
  2006. call :Officex64 15, 2
  2007. call :Othersx64 15, 2, Project, project
  2008. call :Othersx64 15, 2, Visio, visio
  2009. if not defined office15present if not defined project15present if not defined visio15present goto:UninstallOffice4
  2010. call :HEADER "Office 2013 Professional Plus %vera% found", "in path: %officepath2%"
  2011. CHOICE /C AMB /M "[A]uto, [M]anual or [B]ack ? :"
  2012. if %errorlevel%==1 (
  2013. call :Uninstall15Auto
  2014. call :FOOTER
  2015. timeout /t 5
  2016. goto:UninstallOffice4
  2017. )
  2018. if %errorlevel%==3 goto:UninstallOffice4
  2019. start cmd /k cscript "%officepath2%\ospp.vbs" /dstatus
  2020. echo Keypart^(s^): 'XXXXX' or 'XXXXX, XXXXX, XXXXX, ...'
  2021. call :FOOTER
  2022. set /p keypart=Set Keypart:
  2023. cls
  2024. call :HEADER " UNINSTALLING : %keypart%"
  2025. for /d %%a in (%keypart%) do cscript "%officepath2%\ospp.vbs" /unpkey:%%a
  2026. call :FOOTER
  2027. pause
  2028. timeout /t 5
  2029. :UninstallOffice4
  2030. cls
  2031. call :Officex86 15, 2
  2032. call :Othersx86 15, 2, Project, project
  2033. call :Othersx86 15, 2, Visio, visio
  2034. if not defined office15present if not defined project15present if not defined visio15present goto:UninstallOffice5
  2035. call :HEADER "Office 2013 Professional Plus x86 found", "in path: %officepath2%"
  2036. CHOICE /C AMB /M "[A]uto, [M]anual or [B]ack ? :"
  2037. if %errorlevel%==1 (
  2038. call :Uninstall15Auto
  2039. call :FOOTER
  2040. timeout /t 5
  2041. goto:UninstallOffice5
  2042. )
  2043. if %errorlevel%==3 goto:UninstallOffice5
  2044. start cmd /k cscript "%officepath2%\ospp.vbs" /dstatus
  2045. echo Keypart^(s^): 'XXXXX' or 'XXXXX, XXXXX, XXXXX, ...'
  2046. call :FOOTER
  2047. set /p keypart=Set Keypart:
  2048. cls
  2049. call :HEADER " UNINSTALLING : %keypart%"
  2050. for /d %%a in (%keypart%) do cscript "%officepath2%\ospp.vbs" /unpkey:%%a
  2051. call :FOOTER
  2052. pause
  2053. timeout /t 5
  2054. :UninstallOffice5
  2055. cls
  2056. call :CheckC2ROx64 16, 3, Common, office
  2057. call :CheckC2RPx64 16, 3, Project, project
  2058. call :CheckC2RVx64 16, 3, Visio, visio
  2059. if not defined office16present if not defined project16present if not defined visio16present goto:UninstallOffice6
  2060. call :HEADER "Office 2016 Professional Plus %vera% found", "in path: %officepath3%"
  2061. if not exist "%officepath3%\ospp.vbs" (
  2062. echo Office 365 Professional detected. Uninstall via Convert Option.
  2063. echo:
  2064. call :FOOTER
  2065. goto :UninstallOffice6
  2066. )
  2067. CHOICE /C AMB /M "[A]uto, [M]anual or [B]ack ? :"
  2068. if %errorlevel%==1 (
  2069. call :Uninstall16Auto
  2070. call :FOOTER
  2071. timeout /t 5
  2072. goto:UninstallOffice6
  2073. )
  2074. if %errorlevel%==3 goto:UninstallOffice6
  2075. start cmd /k cscript "%officepath3%\ospp.vbs" /dstatus
  2076. echo Keypart^(s^): 'XXXXX' or 'XXXXX, XXXXX, XXXXX, ...'
  2077. call :FOOTER
  2078. set /p keypart=Set Keypart:
  2079. cls
  2080. call :HEADER " UNINSTALLING : %keypart%"
  2081. for /d %%a in (%keypart%) do cscript "%officepath3%\ospp.vbs" /unpkey:%%a
  2082. call :FOOTER
  2083. pause
  2084. timeout /t 5
  2085. :UninstallOffice6
  2086. cls
  2087. call :CheckC2ROx86 16, 3, Common, office
  2088. call :CheckC2RPx86 16, 3, Project, project
  2089. call :CheckC2RVx86 16, 3, Visio, visio
  2090. if not defined office16present if not defined project16present if not defined visio16present goto:Menu5
  2091. call :HEADER "Office 2016 Professional Plus x86 found", "in path: %officepath3%"
  2092. if not exist "%officepath3%\ospp.vbs" (
  2093. echo Office 365 Professional detected. Uninstall via Convert Option.
  2094. echo:
  2095. call :FOOTER
  2096. goto :Menu5
  2097. )
  2098. CHOICE /C AMB /M "[A]uto, [M]anual or [B]ack ? :"
  2099. if %errorlevel%==1 (
  2100. call :Uninstall16Auto
  2101. call :FOOTER
  2102. timeout /t 5
  2103. goto:Menu5
  2104. )
  2105. if %errorlevel%==3 goto:Menu5
  2106. start cmd /k cscript "%officepath3%\ospp.vbs" /dstatus
  2107. echo Keypart^(s^): 'XXXXX' or 'XXXXX, XXXXX, XXXXX, ...'
  2108. call :FOOTER
  2109. set /p keypart=Set Keypart:
  2110. cls
  2111. call :HEADER " UNINSTALLING : %keypart%"
  2112. for /d %%a in (%keypart%) do cscript "%officepath3%\ospp.vbs" /unpkey:%%a
  2113. call :FOOTER
  2114. pause
  2115. timeout /t 5
  2116. goto:Menu5
  2117. :================================================================================================================
  2118. ::===============================================================================================================
  2119. :: OFFICE DOWNLOAD AND INSTALL
  2120. :Office16VnextInstall
  2121. cls
  2122. pushd %~dp0
  2123. call :Header "OFFICE DOWNLOAD AND INSTALL"
  2124. echo [V] OPEN VNEXT PAGE
  2125. echo [D] DOWNLOAD VNEXT OFFICE OFFLINE INSTALL
  2126. echo [I] INSTALL VNEXT OFFICE
  2127. echo:
  2128. echo [O] CREATE OFFICE ONLINE INSTALLER LINK
  2129. echo:
  2130. echo [B] BACK
  2131. call :Footer
  2132. CHOICE /C VDOIB /N /M "YOUR CHOICE ?"
  2133. if %errorlevel%==1 goto :OpenVnext
  2134. if %errorlevel%==2 goto :DownloadO16Offline
  2135. if %errorlevel%==3 goto :DownloadO16Online
  2136. if %errorlevel%==4 goto :InstallO16
  2137. if %errorlevel%==5 goto:Menu5
  2138. ::===============================================================================================================
  2139. :: OFFICE DOWNLOAD
  2140. :OpenVnext
  2141. cls
  2142. set "wget=files\wget\wget.exe"
  2143. set "vnext="
  2144. pushd %~dp0
  2145. call :Header "DOWNLOAD OFFICE 16 OFFLINE SETUP"
  2146. echo This opens Vnext page in your Browser.
  2147. echo:
  2148. echo Make your choice, 'Generate' the link and copy.
  2149. echo:
  2150. echo Open (D)and paste link into the opening TXT, save/close.
  2151. call :FOOTER
  2152. pause
  2153. start "" "http://ms-vnext.net/OfficeDownloader/"
  2154. goto:Office16VnextInstall
  2155. :DownloadO16Offline
  2156. cls
  2157. set "wget=files\wget\wget.exe"
  2158. set "vnext="
  2159. pushd %~dp0
  2160. call :Header "DOWNLOAD OFFICE 16 OFFLINE SETUP"
  2161. echo Download Path?: %downpath%
  2162. call :FOOTER
  2163. set /p downpath=Set Downloadpath ^>
  2164. echo:>"%downpath%\VNEXT_DOWNLOAD.TXT"
  2165. start "" "%downpath%\VNEXT_DOWNLOAD.TXT"
  2166. cls
  2167. pushd %~dp0
  2168. call :Header "DOWNLOAD OFFICE 16 OFFLINE SETUP"
  2169. echo Paste link into the appeared TXT and save.
  2170. echo:
  2171. echo PRESS ANY KEY TO START THE DOWNLOAD.
  2172. call :FOOTER
  2173. pause
  2174. for /f "usebackq delims=" %%a in ("%downpath%\VNEXT_DOWNLOAD.TXT") do set "vnext=%%a"
  2175. if not defined vnext (
  2176. call :FOOTER
  2177. echo Path to Vnext TXT?: %vnexttxt%
  2178. call :FOOTER
  2179. set /p vnexttxt=Enter Path to Vnext TXT ^>
  2180. for /f "usebackq delims=" %%a in ("%downpath%\VNEXT_DOWNLOAD.TXT") do set "vnext=%%a"
  2181. )
  2182. cls
  2183. call :Header "DOWNLOADING OFFICE 16 OFFLINE SETUP"
  2184. xcopy "%wget%" /s /q "%downpath%\" /y >nul
  2185. set "wgetlive=%downpath%\wget.exe"
  2186. cd /d "%downpath%\"
  2187. start "Office 16 Download" cmd /k %wgetlive% %vnext:~18%
  2188. pushd %~dp0
  2189. call :FOOTER
  2190. timeout /t 5
  2191. goto:Office16VnextInstall
  2192. :DownloadO16Online
  2193. cls
  2194. pushd %~dp0
  2195. call :Header "DOWNLOAD OFFICE 16 ONLINE INSTALLER"
  2196. if "%o16version%"=="" set "o16version=ProPlusRetail"
  2197. if "%o16arch%"=="" set "o16arch=x86"
  2198. if "%o16lang%"=="" set "o16lang=en-us"
  2199. echo Download Version?: %o16version%
  2200. echo VALUES: ProPlusRetail, ProfessionalRetail, ProjectProRetail, VisioProRetail
  2201. echo:
  2202. echo Download Architecture?: %o16arch%
  2203. echo:
  2204. echo Download Language?: %o16lang%
  2205. call :FOOTER
  2206. set /p o16version=Set Download Version ^>
  2207. set /p o16arch=Set Install Architecture ^>
  2208. set /p o16lang=Set Install Language ^>
  2209. if "%o16version%"=="ProPlusRetail" set "o16gvlk=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99"
  2210. if "%o16version%"=="ProfessionalRetail" set "o16gvlk=XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99"
  2211. if "%o16version%"=="ProjectProRetail" set "o16gvlk=YG9NW-3K39V-2T3HJ-93F3Q-G83KT"
  2212. if "%o16version%"=="VisioProRetail" set "o16gvlk=PD3PC-RHNGV-FXJ29-8JK7D-RJRJK"
  2213. cls
  2214. call :Header "DOWNLOAD OFFICE 16 ONLINE INSTALLER"
  2215. echo Sending generated link to your browser.
  2216. echo:
  2217. echo Save the Setup.exe and run it to start the process.
  2218. start "" "https://c2rsetup.officeapps.live.com/c2r/download.aspx?ProductreleaseID=%o16version%&language=%o16lang%&platform=%o16arch%&token=%o16gvlk%&version=O16GA&act=1"
  2219. call :FOOTER
  2220. timeout /t 5
  2221. pause
  2222. goto:Office16VnextInstall
  2223. ::===============================================================================================================
  2224. :: OFFICE INSTALL
  2225. :InstallO16
  2226. cls
  2227. set "o16install=1"
  2228. set "p16install=0"
  2229. set "v16install=0"
  2230. pushd %~dp0
  2231. call :Header "INSTALL VNEXT OFFICE 16"
  2232. if "%o16install%"=="1" (set "o16=YES") else (set "o16=NO")
  2233. if "%p16install%"=="1" (set "o16=YES") else (set "p16=NO")
  2234. if "%v16install%"=="1" (set "o16=YES") else (set "v16=NO")
  2235. if "%o16arch%"=="" set "o16arch=x86"
  2236. if "%o16lang%"=="" set "o16lang=en-us"
  2237. if "%installtrigger%"=="" set "installtrigger=1"
  2238. for /f "tokens=*" %%a in ('dir "%downpath%" /ad /b ^| findstr /i "16.0"') do set sub=%%a
  2239. for /f "tokens=2,3 delims=_ " %%a in ("%sub%") do (set "o16lang=%%a")&&(set "o16arch=%%b")
  2240. if defined sub set "installpath=%downpath%\%sub%"
  2241. echo Office Setup Path?: %installpath%
  2242. echo:
  2243. echo Install Offic (1/0)?: %o16install% = %o16%
  2244. echo VALUES: 1=YES 0=NO
  2245. echo:
  2246. echo Install Project (1/0)?: %p16install% = %p16%
  2247. echo VALUES: 1=YES 0=NO
  2248. echo:
  2249. echo Install Visio (1/0)?: %v16install% = %v16%
  2250. echo VALUES: 1=YES 0=NO
  2251. echo:
  2252. echo Install Architecture?: %o16arch%
  2253. echo:
  2254. echo Install Language?: %o16lang%
  2255. echo:
  2256. echo Start install now (1/0)?: %installtrigger%
  2257. call :FOOTER
  2258. set /p installpath=Location of downloaded vnext-package ^>
  2259. set /p o16install=Set Office Install (1/0) ^>
  2260. set /p p16install=Set Project Install (1/0) ^>
  2261. set /p v16install=Set Visio Install (1/0) ^>
  2262. set /p o16arch=Set Install Architecture ^>
  2263. set /p o16lang=Set Install Language ^>
  2264. set /p installtrigger=Start install now (1/0) ? ^>
  2265. if "%installtrigger%"=="0" goto:InstallO16
  2266. xcopy "files\officefixes\16\setup.exe" /s /q "%installpath%\" /y >nul
  2267. ::===============================================================================================================
  2268. :: OFFICE INSTALL XML
  2269. if "%o16arch%"=="x64" (set "o16a=64") else (set "o16a=32")
  2270. set "oxml=%installpath%\configure%o16a%.xml"
  2271. if exist "%oxml%" del /s /q "%oxml%"
  2272. echo ^<Configuration^> >%oxml%
  2273. echo ^<Add OfficeClientEdition="%o16a%"^> >>%oxml%
  2274. echo: >>%oxml%
  2275. if not "%o16install%"=="0" (
  2276. echo ^<Product ID="ProplusRetail"^> >>%oxml%
  2277. echo ^<Language ID="%o16lang%"/^> >>%oxml%
  2278. echo ^</Product^> >>%oxml%
  2279. echo: >>%oxml%
  2280. )
  2281. if not "%p16install%"=="0" (
  2282. echo ^<Product ID="ProjectProRetail"^> >>%oxml%
  2283. echo ^<Language ID="%o16lang%"/^> >>%oxml%
  2284. echo ^</Product^> >>%oxml%
  2285. echo: >>%oxml%
  2286. )
  2287. if not "%v16install%"=="0" (
  2288. echo ^<Product ID="VisioProRetail"^> >>%oxml%
  2289. echo ^<Language ID="%o16lang%"/^> >>%oxml%
  2290. echo ^</Product^> >>%oxml%
  2291. echo: >>%oxml%
  2292. )
  2293. echo ^</Add^> >>%oxml%
  2294. echo ^<Display Level="Full" AcceptEULA="TRUE"/^> >>%oxml%
  2295. echo ^</Configuration^> >>%oxml%
  2296. cls
  2297. timeout /t 5 >nul
  2298. call :Header "INSTALL OFFICE 16"
  2299. start "" "%installpath%\setup.exe" /configure "%oxml%"
  2300. call :FOOTER
  2301. timeout /t 5
  2302. goto:Office16VnextInstall
  2303. :================================================================================================================
  2304. ::===============================================================================================================
  2305. :: OFFICE FIXITs
  2306. :OfficeFixit
  2307. cls
  2308. pushd %~dp0
  2309. call :Header "UNINSTALL OFFICE"
  2310. echo [4] OFFICE 14
  2311. echo:
  2312. echo [5] OFFICE 15
  2313. echo:
  2314. echo [6] OFFICE 16
  2315. echo:
  2316. echo [B] BACK
  2317. call :Footer
  2318. CHOICE /C 456B /N /M "YOUR CHOICE ?"
  2319. if %errorlevel%==1 goto :Fixit14
  2320. if %errorlevel%==2 goto :Fixit15
  2321. if %errorlevel%==3 goto :Fixit16
  2322. if %errorlevel%==4 goto:Menu5
  2323. ::===============================================================================================================
  2324. :: OFFICE FIXITs
  2325. :Fixit16
  2326. cls
  2327. pushd %~dp0
  2328. call :Header "UNINSTALL OFFICE 16"
  2329. CHOICE /C NF /N /M "[N]ormal or [F]orced ?"
  2330. if %errorlevel%==1 goto :Fixit16Normal
  2331. if %errorlevel%==2 goto :Fixit16Forced
  2332. :Fixit16Forced
  2333. start files\officefixes\16\Uninstall\Troubleshoot\OffScrubC2R.vbs
  2334. goto:Menu5
  2335. :Fixit16Normal
  2336. start files\officefixes\16\setup.exe /configure "%cd%\files\fixit\16\Uninstall\RemoveAll.xml"
  2337. goto:Menu5
  2338. :================================================================================================================
  2339. ::===============================================================================================================
  2340. :Fixit14
  2341. pushd %~dp0
  2342. start files\officefixes\MicrosoftFixit50450.msi
  2343. goto:Menu5
  2344. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2345. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2346. :Fixit15
  2347. pushd %~dp0
  2348. start files\officefixes\O15CTRRemove.diagcab
  2349. goto:Menu5
  2350. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2351. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2352. :QuickAndDirtyQAD
  2353. cls
  2354. pushd "%~dp0"
  2355. call :HEADER "QUICK AND DIRTY I", " "
  2356. echo:
  2357. echo CAUTION: THIS WILL ACTIVATE WINDOWS IN BRUTE FORCE MODE ^!
  2358. echo:
  2359. call :FOOTER
  2360. CHOICE /C PB /M "[P]roceed now or [B]ack ? :"
  2361. if %errorlevel%==1 goto :DoIT
  2362. if %errorlevel%==2 goto:Menu5
  2363. :DoIT
  2364. if %win% GEQ 9200 ( goto :qd1 ) else ( goto :qd2 )
  2365. :qd1
  2366. echo:
  2367. call :QADAutoInstall
  2368. goto :DoIT1
  2369. :qd2
  2370. call :CodyInstallAuto
  2371. :DoIT1
  2372. for /d %%a in (RETAIL, OEM, OEM_SLP, OEM_NONSLP, OEM_COA, OEM_DM, VOLUME_MAK, VOLUME_KMS) do if "%channel%"=="%%a" (
  2373. if "%status%"=="1" (
  2374. call :HEADER "QUICK AND DIRTY I", " "
  2375. echo Licensed %channel% version found.
  2376. call :FOOTER
  2377. CHOICE /C AS /N /M "[A]ctivate or [S]ip ?"
  2378. if !errorlevel!==2 goto:ActivationCommandQD
  2379. ))
  2380. call :AutoKeyInstall
  2381. call :AutoActivate
  2382. :ActivationCommandQD
  2383. call :AutoactivateOffice14
  2384. call :AutoactivateOffice1464
  2385. call :AutoactivateOffice15
  2386. call :AutoactivateOffice1564
  2387. call :AutoactivateOffice16
  2388. call :AutoactivateOffice1664
  2389. :goIT2
  2390. if %win% GEQ 9200 (goto :DoIT4) else (goto :goIT5)
  2391. :DoIT4
  2392. call :QADAutoUnInstall
  2393. goto:Menu5
  2394. :goIT5
  2395. echo:
  2396. call :CodyUnInstallAuto
  2397. goto:Menu5
  2398. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2399. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2400. :InstantActivation
  2401. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  2402. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  2403. cls
  2404. CD /D "%~dp0"
  2405. set Directory=%~dp0
  2406. if %win% lss 9200 set host=127.0.0.2
  2407. set "port=1688"
  2408. set pid=RandomKMSPID
  2409. set sai=120
  2410. set sri=10080
  2411. echo:
  2412. :ServerInstall
  2413. if %win% GEQ 9200 (goto :ia1) else (goto :ia2)
  2414. :ia2
  2415. call :CodyInstallAuto
  2416. goto :ActivateWindows
  2417. :ia1
  2418. call :QADAutoInstall
  2419. :ActivateWindows
  2420. cls
  2421. pushd "%~dp0"
  2422. call :HEADER "INSTANT ACTIVATION I", "OS-Version: %ver% found %vera%"
  2423. echo:
  2424. CHOICE /C AS /M "[A]ctivate %ver% or [S]kip ? :"
  2425. if %errorlevel%==1 goto :ActivateWindowsIA1
  2426. if %errorlevel%==2 goto :ActivateOfficeIA1
  2427. :ActivateWindowsIA1
  2428. for /d %%a in (RETAIL, OEM, OEM_SLP, OEM_NONSLP, OEM_COA, OEM_DM, VOLUME_MAK, VOLUME_KMS) do if "%channel%"=="%%a" (
  2429. if "%status%"=="1" (
  2430. call :HEADER "QUICK AND DIRTY I", " "
  2431. echo Licensed %channel% version found.
  2432. call :FOOTER
  2433. CHOICE /C AS /N /M "[A]ctivate or [S]ip ?"
  2434. if !errorlevel!==2 goto:ActivateOfficeIA1
  2435. ))
  2436. call :AutoKeyInstall
  2437. call :AutoActivate
  2438. :ActivateOfficeIA1
  2439. call :Office14
  2440. call :Office1464
  2441. call :Office15
  2442. call :Office1564
  2443. call :Office16
  2444. call :Office1664
  2445. :ServerUninstall
  2446. if %win% GEQ 9200 (goto :ui1) else (goto :ui2)
  2447. :ui1
  2448. call :QADAutoUnInstall
  2449. goto:Menu5
  2450. :ui2
  2451. call :CodyUnInstallAuto
  2452. goto:Menu5
  2453. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2454. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2455. :ReactivationTasks
  2456. cls
  2457. schtasks /query /TN "Reactivate Service DAILY" >nul 2>&1
  2458. if %errorlevel%==0 goto :TaskDeleteRT
  2459. if %win% lss 9200 set host=127.0.0.2
  2460. set name=KMSServer
  2461. set "port=1688"
  2462. set pid=RandomKMSPID
  2463. set sai=120
  2464. set sri=10080
  2465. call :HEADER "RE-ACTIVATION TASK", ""
  2466. :ServerInstall
  2467. if %win% GEQ 9200 (goto :Task8) else (goto :Task7)
  2468. :Task7
  2469. CHOICE /C IB /M "[I]nstall or [B]ack ? :"
  2470. if %errorlevel%==2 goto :Menu5
  2471. call :CodyEmuAutoInstall
  2472. set "trigger=1"
  2473. goto :TaskActivateWindows
  2474. :Task8
  2475. CHOICE /C HEB /M "[H]ooked, [E]mulator and Hook or [B]ack ? :"
  2476. if %errorlevel%==1 goto :HookedTask
  2477. if %errorlevel%==2 goto :EmuAndHookTask
  2478. if %errorlevel%==3 goto :Menu5
  2479. :HookedTask
  2480. call :QADAutoInstall
  2481. set "trigger="
  2482. goto :TaskActivateWindows
  2483. :EmuAndHookTask
  2484. call :CodyEmuAutoInstall
  2485. call :AutoSppExtComObjPatch
  2486. set "trigger=1"
  2487. :TaskActivateWindows
  2488. cls
  2489. pushd "%~dp0"
  2490. call :HEADER "ACTIVATION", "OS-Version: %ver% found %vera%"
  2491. echo:
  2492. CHOICE /C AS /M "[A]ctivate %ver% or [S]kip ? :"
  2493. if %errorlevel%==1 goto :TaskActivateWindows1
  2494. if %errorlevel%==2 goto :TaskActivateOffice1
  2495. :TaskActivateWindows1
  2496. for /d %%a in (RETAIL, OEM, OEM_SLP, OEM_NONSLP, OEM_COA, OEM_DM, VOLUME_MAK, VOLUME_KMS) do if "%channel%"=="%%a" (
  2497. if "%status%"=="1" (
  2498. call :HEADER "QUICK AND DIRTY I", " "
  2499. echo Licensed %channel% version found.
  2500. call :FOOTER
  2501. CHOICE /C AS /N /M "[A]ctivate or [S]ip ?"
  2502. if !errorlevel!==2 goto:TaskActivateOffice1
  2503. ))
  2504. call :AutoKeyInstall
  2505. call :AutoActivate
  2506. :TaskActivateOffice1
  2507. call :Office14
  2508. call :Office1464
  2509. call :Office15
  2510. call :Office1564
  2511. call :Office16
  2512. call :Office1664
  2513. cls
  2514. pushd "%~dp0"
  2515. call :HEADER "TASK CREATION", ""
  2516. echo:
  2517. if not exist "%windir%\%name%" md "%windir%\%name%"
  2518. call :TaskCreate
  2519. call :WriteA
  2520. call :FOOTER
  2521. CHOICE /C CS /M "[C]reate %ver% or [S]kip ? :"
  2522. if !errorlevel!==1 call :WriteWindows
  2523. call :FOOTER
  2524. call :Officex64 14, 1
  2525. call :Othersx64 14, 1, Project, project
  2526. call :Othersx64 14, 1, Visio, visio
  2527. if defined officepath1 (
  2528. CHOICE /C CS /M "[C]reate Office 14 or [S]kip ? :"
  2529. if !errorlevel!==1 call :WriteOffice14
  2530. call :FOOTER
  2531. )
  2532. call :Officex86 14, 1
  2533. call :Othersx86 14, 1, Project, project
  2534. call :Othersx86 14, 1, Visio, visio
  2535. if defined officepath1 (
  2536. CHOICE /C CS /M "[C]reate Office 14 or [S]kip ? :"
  2537. if !errorlevel!==1 call :WriteOffice14
  2538. call :FOOTER
  2539. )
  2540. call :Officex64 15, 2
  2541. call :Othersx64 15, 2, Project, project
  2542. call :Othersx64 15, 2, Visio, visio
  2543. if defined officepath2 (
  2544. CHOICE /C CS /M "[C]reate Office 15 or [S]kip ? :"
  2545. if !errorlevel!==1 call :WriteOffice15
  2546. call :FOOTER
  2547. )
  2548. call :Officex86 15, 2
  2549. call :Othersx86 15, 2, Project, project
  2550. call :Othersx86 15, 2, Visio, visio
  2551. if defined officepath2 (
  2552. CHOICE /C CS /M "[C]reate Office 15 or [S]kip ? :"
  2553. if !errorlevel!==1 call :WriteOffice15
  2554. call :FOOTER
  2555. )
  2556. call :CheckC2ROx64 16, 3, Common, office
  2557. call :CheckC2RPx64 16, 3, Project, project
  2558. call :CheckC2RVx64 16, 3, Visio, visio
  2559. if defined officepath3 (
  2560. CHOICE /C CS /M "[C]reate Office 16 or [S]kip ? :"
  2561. if !errorlevel!==1 call :WriteOffice16
  2562. call :FOOTER
  2563. )
  2564. call :CheckC2ROx86 16, 3, Common, office
  2565. call :CheckC2RPx86 16, 3, Project, project
  2566. call :CheckC2RVx86 16, 3, Visio, visio
  2567. if defined officepath3 (
  2568. CHOICE /C CS /M "[C]reate Office 16 or [S]kip ? :"
  2569. if !errorlevel!==1 call :WriteOffice16
  2570. call :FOOTER
  2571. )
  2572. call :WriteOthersCleanup
  2573. call :WriteZ
  2574. tasklist /FI "IMAGENAME eq KMSServer.exe" 2>NUL | find /I /N "KMSServer.exe">NUL
  2575. if "%ERRORLEVEL%"=="0" TASKKILL /F /IM "KMSServer.exe" >nul
  2576. pause
  2577. goto:Menu5
  2578. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2579. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2580. :TaskDeleteRT
  2581. cls
  2582. set name=KMSServer
  2583. call :HEADER "TASK DELETION", ""
  2584. SchTasks /Delete /TN "Reactivate Service DAILY" /F
  2585. SchTasks /Delete /TN "Reactivate Service ONLOGON" /F
  2586. SchTasks /Delete /TN "Reactivate Service ONSTART" /F
  2587. call :FOOTER
  2588. timeout /t 5
  2589. if exist "%SystemRoot%\System32\KMS-QADhooker.*" call :QADAutoUnInstall
  2590. if exist "%windir%\%name%\%name%.exe" call :CodyEmuAutoUninstall
  2591. if exist "%SystemRoot%\System32\SppExtComObjPatcher.*" call :AutoSppExtComObjPatch
  2592. if exist "%windir%\%name%" rd /s /q "%windir%\%name%" >nul
  2593. call :FOOTER
  2594. timeout /t 5
  2595. goto:Menu5
  2596. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2597. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2598. :RearmOffice
  2599. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot" >nul 2>&1
  2600. if errorlevel 1 goto :RearmOffice1532
  2601. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot" /v "Path"') do (SET officepath=%%b) >nul 2>&1
  2602. cls
  2603. call :HEADER "Office 2013 Professional Plus %vera% found", "in path: %officepath%"
  2604. echo:
  2605. CHOICE /C RS /M " [R]earm or [S]kip ? : "
  2606. if %errorlevel%==1 goto :RO3
  2607. if %errorlevel%==2 goto :Menu5
  2608. :RO3
  2609. echo:
  2610. "%officepath%\ospprearm.exe"
  2611. call :FOOTER
  2612. timeout /t 5
  2613. goto:Menu5
  2614. :RearmOffice1532
  2615. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot" >nul 2>&1
  2616. if errorlevel 1 goto:Menu5
  2617. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot" /v "Path"') do (SET officepath=%%b) >nul 2>&1
  2618. cls
  2619. call :HEADER "Office 2013 Professional Plus x86 found", "in path: %officepath%"
  2620. echo:
  2621. CHOICE /C RS /M " [R]earm or [S]kip ? : "
  2622. if %errorlevel%==1 goto :RO4
  2623. if %errorlevel%==2 goto:Menu5
  2624. :RO4
  2625. echo:
  2626. "%officepath%\ospprearm.exe"
  2627. call :FOOTER
  2628. timeout /t 5
  2629. goto:Menu5
  2630. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2631. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2632. :KeyInstall
  2633. pushd "%~dp0"
  2634. cls
  2635. call :HEADER "OS-Version: %ver% found %vera%", " "
  2636. if %win% geq 10240 (
  2637. echo Windows 10 %edition% detected. Install generic Retail Key?
  2638. call :FOOTER
  2639. CHOICE /C IS /M " [I]nstall or [S]kip ? : "
  2640. if !errorlevel!==1 (if "%edition%"=="Professional" set "key=VK7JG-NPHTM-C97JM-9MPGT-3V66T")&&(if "%edition%"=="Core" set "key=YTMG3-N6DKC-DKB77-7M9GH-8HVX7")&&(if "%edition%"=="CoreSingleLanguage" set "key=BT79Q-G7N6G-PGBYW-4YWX6-6F4BT")&&(if "%edition%"=="Enterprise" set "key=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99")&&(goto :InstallOrder)
  2641. )
  2642. call :KeyCheck
  2643. echo (Value: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)
  2644. echo:
  2645. echo:
  2646. echo Version: %ver% %vera%
  2647. echo Default GVLK: %key% %comment%
  2648. echo:
  2649. echo:
  2650. echo If key is shown, simply hit ENTER.
  2651. call :FOOTER
  2652. set /p key=Set key ^>
  2653. :InstallOrder
  2654. call :FOOTER
  2655. wmic path %sls% where version='%version%' call InstallProductKey ProductKey="%key%" >nul
  2656. if %errorlevel% equ 0 echo Successfully installed Product Key & echo: & echo For: %ver% %vera% & echo: & echo KEY: %key%
  2657. if %errorlevel% neq 0 echo Installing Product Key Failed.
  2658. call :FOOTER
  2659. timeout /t 5
  2660. goto:Menu5
  2661. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2662. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2663. :CallMS
  2664. start cmd /c "%windir%\system32\slui.exe 4"
  2665. goto:Menu5
  2666. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2667. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2668. :Validate
  2669. if %win% NEQ 7601 call :NotSupported
  2670. if %win% NEQ 7601 goto:Menu5
  2671. cls
  2672. echo:
  2673. set url=https://www.microsoft.com/genuine/downloads/FailureScenarios.aspx
  2674. call :HEADER " This will open Internet Explorer to Validate the System", " "
  2675. echo:
  2676. start "%ProgramFiles%\Internet Explorer\iexplore.exe" "%url%"
  2677. call :FOOTER
  2678. timeout /t 5
  2679. goto:Menu5
  2680. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2681. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2682. :BlockCheck
  2683. cls
  2684. call :HEADER "This Blocks the MS KMS-Check", " "
  2685. echo:
  2686. netsh advfirewall firewall add rule name="Key Management Services 1" protocol=TCP dir=out localport=443 remoteip=65.52.98.231 action=block >nul
  2687. if %errorlevel%==0 echo Successfully blocked Key Management Services 1. & echo:
  2688. if %errorlevel%==1 echo Blocking Key Management Services 1 failed. & echo:
  2689. netsh advfirewall firewall add rule name="Key Management Services 2" protocol=TCP dir=out localport=443 remoteip=65.52.98.232 action=block >nul
  2690. if %errorlevel%==0 echo Successfully blocked Key Management Services 2. & echo:
  2691. if %errorlevel%==1 echo Blocking Key Management Services 2 failed. & echo:
  2692. netsh advfirewall firewall add rule name="Key Management Services 3" protocol=TCP dir=out localport=443 remoteip=65.52.98.233 action=block >nul
  2693. if %errorlevel%==0 echo Successfully blocked Key Management Services 3. & echo:
  2694. if %errorlevel%==1 echo Blocking Key Management Services 3 failed. & echo:
  2695. call :FOOTER
  2696. timeout /t 5
  2697. goto:Menu5
  2698. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2699. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2700. :UnBlockCheck
  2701. cls
  2702. call :HEADER "This Unblocks the MS KMS-Check", " "
  2703. echo:
  2704. netsh advfirewall firewall add rule name="Key Management Services 1" protocol=TCP dir=out localport=443 remoteip=65.52.98.231 action=allow >nul
  2705. if %errorlevel%==0 echo Successfully unblocked Key Management Services 1. & echo:
  2706. if %errorlevel%==1 echo Unblocking Key Management Services 1 failed. & echo:
  2707. netsh advfirewall firewall add rule name="Key Management Services 2" protocol=TCP dir=out localport=443 remoteip=65.52.98.232 action=allow >nul
  2708. if %errorlevel%==0 echo Successfully unblocked Key Management Services 2. & echo:
  2709. if %errorlevel%==1 echo Unblocking Key Management Services 2 failed. & echo:
  2710. netsh advfirewall firewall add rule name="Key Management Services 3" protocol=TCP dir=out localport=443 remoteip=65.52.98.233 action=allow >nul
  2711. if %errorlevel%==0 echo Successfully unblocked Key Management Services 3. & echo:
  2712. if %errorlevel%==1 echo Unblocking Key Management Services 3 failed. & echo:
  2713. call :FOOTER
  2714. timeout /t 5
  2715. goto:Menu5
  2716. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2717. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2718. :ExportTokens
  2719. cls
  2720. echo:
  2721. set "tokenpath=%userprofile%\desktop"
  2722. call :HEADER "This will export Activation Tokens to a folder.", " "
  2723. echo:
  2724. echo Standard Path: %tokenpath%
  2725. echo:
  2726. set /p tokenpath=Set Path : ^>
  2727. echo:
  2728. Licensingdiag -report %tokenpath%\Licensingdiag.xml -log %tokenpath%\Licensingdiag.cab
  2729. call :FOOTER
  2730. timeout /t 5
  2731. goto:Menu5
  2732. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2733. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2734. :RebuildLicense
  2735. cls
  2736. call :HEADER "Restoring License", " "
  2737. echo:
  2738. cscript %windir%\system32\slmgr.vbs /rilc
  2739. call :FOOTER
  2740. pause
  2741. goto:Menu5
  2742. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2743. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2744. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2745. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2746. ::SYSTEM TOOLS SECTION
  2747. :CommandPrompt
  2748. pushd %windir%\system32
  2749. start "Elevated CMD" cmd /k cmd
  2750. goto:Menu1
  2751. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2752. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2753. :StartSysInternal
  2754. files\sysinternal.cmd
  2755. goto:Menu1
  2756. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2757. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2758. :StartTools
  2759. files\tools.cmd
  2760. goto:Menu1
  2761. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2762. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2763. :StartSystemTools
  2764. files\systemtools.cmd
  2765. goto:Menu1
  2766. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2767. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2768. :Reboot
  2769. start shutdown.exe /r /t 0
  2770. goto:eof
  2771. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2772. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2773. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2774. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2775. ::EMULATOR CHECK LOOPS
  2776. :SetEmulatorData
  2777. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  2778. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  2779. echo:
  2780. echo ...Checking for Server Emulator instances:
  2781. echo:
  2782. wmic process where "name='KMSServer.exe'" | findstr /i /c:"KMSServer.exe" >nul
  2783. if %errorlevel%==0 (
  2784. call :ServerRunning
  2785. goto:MenuC
  2786. )
  2787. set "port=1688"
  2788. set pid=RandomKMSPID
  2789. set sai=43200
  2790. set sri=43200
  2791. if /i "%hwid%"=="" set hwid=364F463A8863D35F
  2792. if /i "%kpop%"=="" set kpop=1
  2793. if /i "%loglevel%"=="" set loglevel=1
  2794. call :FOOTER
  2795. echo Port
  2796. echo Default: %port%
  2797. echo:
  2798. echo Interval for unactivated Client in Minutes (15 - 43200)
  2799. echo Default: %sai%
  2800. echo:
  2801. echo Interval for Reactivation in Minutes (15 - 43200)
  2802. echo Default: %sri%
  2803. echo:
  2804. echo Hardware ID
  2805. echo Default: %hwid%
  2806. echo Values: KMS Server Hardware ID
  2807. echo:
  2808. echo LogLevel
  2809. echo Default: %loglevel%
  2810. echo Values: KMS Server Loglevel 1 / 2
  2811. echo:
  2812. echo Kill Process On Port
  2813. echo Default: %kpop%
  2814. echo Values: 0 = Off / 1 = On
  2815. call :FOOTER
  2816. set /p port=Set port ^>
  2817. set /p sai=Set sai ^>
  2818. set /p sri=Set sri ^>
  2819. set /p hwid=Set Hardware ID ^>
  2820. set /p loglevel=Set LogLevel ^>
  2821. set /p kpop=Set Kill process On Start ^>
  2822. goto:eof
  2823. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2824. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2825. :ServerRunning
  2826. echo:
  2827. echo ...Server is already running.
  2828. call :FOOTER
  2829. timeout /t 5
  2830. goto:eof
  2831. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2832. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2833. :CodyPID
  2834. cls
  2835. call :FOOTER
  2836. echo [A] Enter specific ePID for each product separately
  2837. echo:
  2838. echo [B] Server 2008 R2 KMS_C (kms.creighton.edu)
  2839. echo 55041-00206-152-174451-03-1033-7601.0000-2442012
  2840. echo [C] Server 2008 R2 KMS_C (kms.cc.columbia.edu)
  2841. echo 05426-00206-152-103094-03-1033-9200.0000-2842012
  2842. echo:
  2843. echo [D] DefaultKMSPID by MTK
  2844. echo 55041-00168-305-246209-03-1033-7600.0000-0522010
  2845. echo:
  2846. echo [E] RandomKMSPID
  2847. echo:
  2848. echo [F] 55041-00172-037-340769-03-1049-7601.0000-3532012
  2849. echo [G] 55041-00096-199-128989-03-1033-7601.0000-3502012
  2850. echo [H] 55041-00172-037-340769-03-1049-7601.0000-3532012
  2851. echo:
  2852. echo [K] Enter Custom KMS Extended PID
  2853. call :FOOTER
  2854. CHOICE /C ABCDEFGHK /M "Choose ePID :"
  2855. if %errorlevel%==1 set pid=" " & goto :InputPID
  2856. if %errorlevel%==2 set pid=55041-00206-152-174451-03-1033-7601.0000-2442012 & goto :eof
  2857. if %errorlevel%==3 set pid=05426-00206-152-103094-03-1033-9200.0000-2842012 & goto :eof
  2858. if %errorlevel%==4 set pid=DefaultKMSPID & goto :eof
  2859. if %errorlevel%==5 set pid=RandomKMSPID & goto :eof
  2860. if %errorlevel%==6 set pid=55041-00172-037-340769-03-1049-7601.0000-3532012 & goto :eof
  2861. if %errorlevel%==7 set pid=55041-00096-199-128989-03-1033-7601.0000-3502012 & goto :eof
  2862. if %errorlevel%==8 set pid=55041-00172-037-340769-03-1049-7601.0000-3532012 & goto :eof
  2863. if %errorlevel%==9 set /p "pid=Set Custom ePID: ^>" & goto :eof
  2864. :InputPID
  2865. set WindowsPid="05426-00206-152-251264-03-1031-9200.0000-0902013"
  2866. set Office2010Pid="05426-00206-234-251264-03-1031-9200.0000-0902013"
  2867. set Office2013Pid="55041-00096-199-251264-03-1031-9200.0000-0902013"
  2868. echo:
  2869. echo Windows ePID %WindowsPid%
  2870. echo Office 2010 ePID %Office2010Pid%
  2871. echo Office 2013 ePID %Office2013Pid%
  2872. call :FOOTER
  2873. set /p WindowsPid=Set WindowsPid ^>
  2874. set /p Office2010Pid=Set Office2010Pid ^>
  2875. set /p Office2013Pid=Set Office2013Pid ^>
  2876. call :RegCODYS
  2877. echo:
  2878. goto:eof
  2879. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2880. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2881. :UnRegOffice
  2882. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  2883. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  2884. reg delete "%hSpp%" /f /v "KeyManagementServiceName" >nul 2>&1
  2885. reg delete "%hSpp%" /f /v "KeyManagementServicePort" >nul 2>&1
  2886. reg delete "%hSpp%" /f /v "VLActivationType" >nul 2>&1
  2887. reg delete "%hSpp%" /f /v "UserOperations" >nul 2>&1
  2888. reg delete "%hOspp%" /f /v "KeyManagementServiceName" >nul 2>&1
  2889. reg delete "%hOspp%" /f /v "KeyManagementServicePort" >nul 2>&1
  2890. reg delete "%hOspp%" /f /v "VLActivationType" >nul 2>&1
  2891. reg delete "%hOspp%" /f /v "UserOperations" >nul 2>&1
  2892. goto:eof
  2893. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2894. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2895. :RegOffice
  2896. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  2897. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  2898. reg delete %hOspp%\59A52881-A989-479D-AF46-F275C6370663 /f >nul 2>&1
  2899. reg delete %hSpp%\0ff1ce15-a989-479d-af46-f275c6370663 /f >nul 2>&1
  2900. reg add "%hSpp%" /f /v "KeyManagementServiceName" /d %host% /t "REG_SZ" >nul
  2901. reg add "%hSpp%" /f /v "KeyManagementServicePort" /d %port% /t "REG_SZ" >nul
  2902. reg add "%hSpp%" /f /v "VLActivationType" /d "2" /t "REG_DWORD" >nul
  2903. reg add "%hSpp%" /f /v "UserOperations" /d "1" /t "REG_DWORD" >nul
  2904. reg delete %hSpp%\55C92734-D682-4D71-983E-D6EC3F16059F /f >nul 2>&1
  2905. reg delete %hOspp%\0ff1ce15-a989-479d-af46-f275c6370663 /f >nul 2>&1
  2906. reg add "%hOspp%" /f /v "KeyManagementServiceName" /d %host% /t "REG_SZ" >nul
  2907. reg add "%hOspp%" /f /v "KeyManagementServicePort" /d %port% /t "REG_SZ" >nul
  2908. reg add "%hOspp%" /f /v "VLActivationType" /d "2" /t "REG_DWORD" >nul
  2909. reg add "%hOspp%" /f /v "UserOperations" /d "1" /t "REG_DWORD" >nul
  2910. goto:eof
  2911. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2912. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2913. :RegCODY
  2914. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer" /v Description /t REG_SZ /d "Windows Service that emulates a Key Management Service (KMS) Server" /f >nul
  2915. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters" /f /v "KMSPort" /d %port% /t "REG_SZ" >nul
  2916. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters" /f /v "KMSPID" /d %pid% /t "REG_SZ" >nul
  2917. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters" /f /v "KMSHWID" /d %hwid% /t "REG_SZ" >nul
  2918. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters" /f /v "VLActivationInterval" /d %sai% /t "REG_DWORD" >nul
  2919. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters" /f /v "VLRenewalInterval" /d %sri% /t "REG_DWORD" >nul
  2920. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters" /f /v "KillProcessOnPort" /d %kpop% /t "REG_DWORD" >nul
  2921. goto:eof
  2922. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2923. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2924. :RegCODYS
  2925. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters\KMSPID" /f /v "55c92734-d682-4d71-983e-d6ec3f16059f" /d %WindowsPid% /t "REG_SZ" >nul
  2926. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters\KMSPID" /f /v "59a52881-a989-479d-af46-f275c6370663" /d %Office2010Pid% /t "REG_SZ" >nul
  2927. REG ADD "HKLM\SYSTEM\CurrentControlSet\services\KMSServer\Parameters\KMSPID" /f /v "0ff1ce15-a989-479d-af46-f275c6370663" /d %Office2013Pid% /t "REG_SZ" >nul
  2928. goto:eof
  2929. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2930. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2931. :UnRegCODY
  2932. REG DELETE "HKLM\SYSTEM\CurrentControlSet\services\KMSServer" /f >nul
  2933. goto:eof
  2934. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2935. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2936. :RegDH
  2937. set hService="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\KMSServerService\Parameters"
  2938. REG ADD HKLM\SYSTEM\CurrentControlSet\services\%name% /v Description /t REG_SZ /d "Windows Service that emulates a Key Management Service (KMS) Server" /f >nul
  2939. reg add "%hService%" /f /v "Windows" /d %WindowsPid% /t "REG_SZ" >nul
  2940. reg add "%hService%" /f /v "Office2010" /d %Office2010Pid% /t "REG_SZ" >nul
  2941. reg add "%hService%" /f /v "Office2013" /d %Office2013Pid% /t "REG_SZ" >nul
  2942. reg add "%hService%" /f /v "Port" /d %port% /t "REG_SZ" >nul
  2943. reg add "%hService%" /f /v "ActivatedMachines" /d "50" /t "REG_DWORD" >nul
  2944. reg add "%hService%" /f /v "KMSHWID" /d %hwid% /t "REG_SZ" >nul
  2945. reg add "%hService%" /f /v "LogLevel" /d %loglevel% /t "REG_DWORD" >nul
  2946. reg add "%hService%" /f /v "KillProcessOnPort" /d %kpop% /t "REG_DWORD" >nul
  2947. reg add "%hService%" /f /v "ActivationInterval" /d %sai% /t "REG_DWORD" >nul
  2948. reg add "%hService%" /f /v "RenewalInterval" /d %sri% /t "REG_DWORD" >nul
  2949. goto:eof
  2950. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2951. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2952. :Initiate
  2953. pushd %~dp0
  2954. set "port=1688"
  2955. if exist "%windir%\%name%\%name% %vera%.exe" del /s /q "%windir%\%name%\%name% %vera%.exe" >nul
  2956. xcopy "files\KMS Server Service %vera%.exe" "%windir%\%name%\" /Q /Y >nul
  2957. ren "%windir%\%name%\KMS Server Service %vera%.exe" %name%.exe
  2958. netsh advfirewall firewall add rule name="%name% %port%" dir=in program="%windir%\%name%\%name%.exe" localport=%port% protocol=TCP action=allow remoteip=any
  2959. netsh advfirewall firewall add rule name="%name% %port%" dir=in program="%windir%\%name%\%name%.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  2960. goto:eof
  2961. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2962. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2963. :FirewallInstall2
  2964. cls
  2965. call :HEADER "This option opens Firewall for KMS Server Emulator", " "
  2966. echo:
  2967. echo Checking for Server Emulator instances:
  2968. echo:
  2969. wmic process where "name='KMSServer.exe'" | findstr /i /c:"KMSServer.exe" >nul
  2970. if %errorlevel%==1 call :ServerNotRunning
  2971. if %errorlevel%==1 goto:MenuC
  2972. echo:
  2973. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=any
  2974. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  2975. call :FOOTER
  2976. timeout /t 5
  2977. goto:MenuC
  2978. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2979. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2980. :FirewallDelete2
  2981. cls
  2982. call :HEADER "This option deletes Rule for KMS Server Emulator", " "
  2983. echo:
  2984. echo Checking for Server Emulator instances:
  2985. echo:
  2986. wmic process where "name='KMSServer.exe'" | findstr /i /c:"KMSServer.exe" >nul
  2987. if %errorlevel%==1 call :ServerNotRunning
  2988. if %errorlevel%==1 goto:MenuC
  2989. echo:
  2990. netsh advfirewall firewall delete rule name="KMS Server Emulator"
  2991. call :FOOTER
  2992. timeout /t 5
  2993. goto:MenuC
  2994. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2995. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2996. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2997. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2998. ::SERVICES INSTALL LOOPS
  2999. :SetServiceData
  3000. pushd "%~dp0"
  3001. if /i "%name%"=="" set name=KMSServer
  3002. echo Default: %name%
  3003. echo Values: Servername
  3004. echo:
  3005. set /p name=Set name ^>
  3006. echo:
  3007. if "%triggerS%"=="4" goto :furtherSSD5
  3008. sc query %name% >NUL
  3009. if errorlevel 1 goto :furtherSSD5
  3010. if errorlevel 0 echo ..Service is already installed.
  3011. timeout /t 5
  3012. goto :Menu2
  3013. :furtherSSD5
  3014. if /i "%host%"=="" set host=127.0.0.2
  3015. if /i "%port%"=="" set "port=1688"
  3016. if /i "%sai%"=="" set sai=43200
  3017. if /i "%sri%"=="" set sri=43200
  3018. if /i "%start%"=="" set start=auto
  3019. if /i "%hwid%"=="" set hwid=364F463A8863D35F
  3020. if /i "%kpop%"=="" set kpop=1
  3021. if /i "%loglevel%"=="" set loglevel=1
  3022. call :FOOTER
  3023. echo Port
  3024. echo Default: %port%
  3025. echo:
  3026. echo Interval for unactivated Client in Minutes (15 - 43200)
  3027. echo Default: %sai%
  3028. echo:
  3029. echo Interval for Reactivation in Minutes (15 - 43200)
  3030. echo Default: %sri%
  3031. echo:
  3032. echo Service Start Type
  3033. echo Default: %start%
  3034. echo Values: boot, system, auto, demand, disabled, delayed-auto
  3035. echo:
  3036. echo Hardware ID
  3037. echo Default: %hwid%
  3038. echo Values: KMS Server Hardware ID
  3039. echo:
  3040. echo Kill Process On Port
  3041. echo Default: %kpop%
  3042. echo Values: 0 = Off / 1 = On
  3043. echo:
  3044. echo LogLevel
  3045. echo Default: %loglevel%
  3046. echo Values: KMS Server Loglevel 1 / 2
  3047. call :FOOTER
  3048. set /p port= Set port ^>
  3049. set /p sai= Set sai ^>
  3050. set /p sri=Set sri ^>
  3051. set /p start=Set start type ^>
  3052. set /p hwid=Set Hardware ID ^>
  3053. set /p kpop=Set Kill Process Status ^>
  3054. set /p loglevel=Set LogLevel ^>
  3055. goto:eof
  3056. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3057. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3058. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3059. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3060. ::CLIENT EMULATOR LOOPS
  3061. :SetClientData
  3062. cls
  3063. set ver2=Office2010
  3064. call :HEADER "This option sets the adress and port on which the Client searches for response", " "
  3065. echo:
  3066. if /i "%host%"=="" set "host=127.0.0.2"
  3067. if /i "%port%"=="" set "port=1688"
  3068. if /i "%ver1%"=="" set "ver1=Windows8"
  3069. if /i "%ver3%"=="" set "ver3=Office2013V5"
  3070. echo Mode to run Client Emulator:
  3071. call :FOOTER
  3072. CHOICE /C AM /M "[A]uto or [M]anual : "
  3073. if %errorlevel%==1 goto :Repeat
  3074. if %errorlevel%==2 goto :Manual
  3075. :Manual
  3076. call :FOOTER
  3077. echo Default: %host%
  3078. echo Values: IP Adress or Hostname
  3079. echo:
  3080. echo Default: %port%
  3081. echo Values: Host Port
  3082. echo:
  3083. echo Default: %ver1%
  3084. echo Values: WindowsVista, Windows7 and Windows8
  3085. echo:
  3086. echo Default: %ver3%
  3087. echo Values: Office2013V4 and Office2013V5
  3088. call :FOOTER
  3089. set /p host=Set host ^>
  3090. set /p port=Set port ^>
  3091. set /p ver1=Set Windows version ^>
  3092. set /p ver3=Set Office 2013 version ^>
  3093. :Repeat
  3094. cls
  3095. call :HEADER "KMS Client Emulator at: [%host%] : [%port%]", " "
  3096. echo Starting online test: %date% at: %time%
  3097. echo:
  3098. echo ---- KMS Host for: %ver1% ----------------
  3099. echo:
  3100. %k% %port% %host% %ver1%
  3101. echo:
  3102. echo ---- KMS Host for: %ver2% --------------
  3103. echo:
  3104. %k% %port% %host% %ver2%
  3105. echo:
  3106. echo ---- KMS Host for: %ver3% ------------
  3107. echo:
  3108. %k% %port% %host% %ver3%
  3109. call :FOOTER
  3110. CHOICE /C ARB /M " [A]gain, [R]epeat or [B]ack : "
  3111. if %errorlevel%==1 goto :Repeat
  3112. if %errorlevel%==2 goto :SetClientData
  3113. if %errorlevel%==3 goto:eof
  3114. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3115. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3116. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3117. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3118. ::STATUS CHECK LOOPS
  3119. :CheckStatusWindows
  3120. set "slp=SoftwareLicensingProduct"
  3121. if %win% GEQ 9200 for /f %%A in ('cscript files\PID8.vbs') do set "productkey=%%A"
  3122. if %win% LSS 9200 for /f %%A in ('cscript files\PID7.vbs') do set "productkey=%%A"
  3123. for /f "tokens=2 delims==" %%A in ('"wmic path %slp% where (Description LIKE '%%Windows%%') get KeyManagementServiceProductKeyID /format:list" ^| findstr /i 0000') do set "kmsepid=%%A"
  3124. for /f "tokens=2 delims==" %%A in ('"wmic path %slp% where LicenseStatus='%status%' get Description /format:list /translate:NoComma" ^| findstr /i Windows') do set "windescription=%%A"
  3125. for /f "tokens=2 delims==" %%A in ('"wmic path %slp% where LicenseStatus='%status%' get Name /format:list /translate:NoComma" ^| findstr /i Windows') do set "winname=%%A"
  3126. for /f "tokens=2 delims==" %%A in ('"wmic path %slp% where (Description LIKE '%%Windows%%') get KeyManagementServicePort /format:list"') do if %%A geq 1 set "kmsport=%%A"
  3127. for /f "tokens=2 delims==" %%A in ('"wmic path %slp% where (Description LIKE '%%Windows%%') get KeyManagementServiceMachine /format:list"') do if %%A geq 1 set "kmsIP=%%A"
  3128. for /f "tokens=2 delims== " %%A in ('"wmic path %slp% where (Name LIKE '%%Windows%%') get GracePeriodRemaining /format:list"') do (set "grace1=%%A")&&(if %%A geq 1 goto:CheckNext)
  3129. :CheckNext
  3130. for /f "tokens=3 delims==: " %%G in ('"DISM /online /english /Get-CurrentEdition" ^| findstr /i Version') do set currentversion=%%G
  3131. goto:eof
  3132. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3133. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3134. :CheckStatusOffice
  3135. set "slp=SoftwareLicensingProduct"
  3136. set "sls=SoftwareLicensingService"
  3137. set "spp=SoftwareProtectionProduct"
  3138. set "ospp=OfficeSoftwareProtectionProduct"
  3139. set "osps=OfficeSoftwareProtectionService"
  3140. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get LicenseStatus /format:list"') do if %%A geq 1 set "officestatus=%%A"
  3141. if %win% GEQ 9200 if %~2 equ 15 for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Description LIKE '%%%~2%%') get RemainingAppReArmCount /format:list"') do set "orearm=%%A"
  3142. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get KeyManagementServiceProductKeyID /format:list" ^| findstr /i 0000') do if %%A geq 0 set "HostNa%~3=%%A"
  3143. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where LicenseStatus='%officestatus%' get Name /format:list /translate:NoComma" ^| findstr /i %~2') do set "NA%~3=%%A"
  3144. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get KeyManagementServicePort /format:list"') do if %%A geq 1 set "KP%~3=%%A"
  3145. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get KeyManagementServiceMachine /format:list"') do if %%A geq 1 set "KIP%~3=%%A"
  3146. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get GracePeriodRemaining /format:list"') do if %%A geq 1 set "GraPe%~3=%%A"
  3147. for /f "tokens=2 delims== " %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get PartialProductKey /format:list"') do if %%A geq 1 set "PaKey%~3=%%A"
  3148. goto:eof
  3149. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3150. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3151. :CheckStatusOthers
  3152. set "slp=SoftwareLicensingProduct"
  3153. set "sls=SoftwareLicensingService"
  3154. set "spp=SoftwareProtectionProduct"
  3155. set "ospp=OfficeSoftwareProtectionProduct"
  3156. set "osps=OfficeSoftwareProtectionService"
  3157. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get LicenseStatus /format:list"') do if %%A geq 1 set "otherstatus=%%A"
  3158. if %win% GEQ 9200 if %~2 equ 15 for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get RemainingAppReArmCount /format:list"') do set "orearm=%%A"
  3159. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get KeyManagementServiceProductKeyID /format:list" ^| findstr /i 0000') do if %%A geq 0 set "HostNa%~3=%%A"
  3160. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where LicenseStatus='%otherstatus%' get Name /format:list /translate:NoComma" ^| findstr /i %~2*') do set "NA%~3=%%A"
  3161. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get KeyManagementServicePort /format:list"') do if %%A geq 1 set "KP%~3=%%A"
  3162. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get KeyManagementServiceMachine /format:list"') do if %%A geq 1 set "KIP%~3=%%A"
  3163. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get GracePeriodRemaining /format:list"') do if %%A geq 1 set "GraPe%~3=%%A"
  3164. for /f "tokens=2 delims== " %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get PartialProductKey /format:list"') do if %%A geq 1 set "PaKey%~3=%%A"
  3165. goto:eof
  3166. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3167. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3168. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3169. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3170. ::ACTIVATION LOOPS
  3171. :AutoActivate
  3172. cls
  3173. call :CheckSPPSVC
  3174. call :ID
  3175. if %win% lss 9200 set host=127.0.0.2
  3176. set "port=1688"
  3177. call :HEADER "OS-Version: %ver% found %vera%", "ID: %id%"
  3178. wmic path %sls% where version='%version%' call SetKeyManagementServiceMachine MachineName="%host%" >nul
  3179. if %errorlevel% equ 0 echo Successfully changed IP to %host%.
  3180. if %errorlevel% neq 0 echo Setting IP to %host% Failed.
  3181. wmic path %sls% where version='%version%' call SetKeyManagementServicePort %port% >nul
  3182. if %errorlevel% equ 0 echo Successfully changed Port to %port%. & echo:
  3183. if %errorlevel% neq 0 echo Setting Port to %port% Failed.
  3184. wmic path %slp% where ID='%id%' call Activate >nul
  3185. if %errorlevel% equ 0 echo: & echo Successfully activated: %ver% %vera%
  3186. if %errorlevel% neq 0 echo Activation Failed. No Host available.
  3187. call :FOOTER
  3188. wmic path %sls% where version='%version%' call ClearKeyManagementServiceMachine >nul
  3189. wmic path %sls% where version='%version%' call ClearKeyManagementServicePort >nul
  3190. wmic path %sls% where version='%version%' call DisableKeyManagementServiceDnsPublishing 1 >nul
  3191. wmic path %sls% where version='%version%' call DisableKeyManagementServiceHostCaching 1 >nul
  3192. timeout /t 5
  3193. goto:eof
  3194. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3195. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3196. :AutoKeyInstall
  3197. pushd "%~dp0"
  3198. cls
  3199. call :HEADER "OS-Version: %ver% found %vera%", " "
  3200. echo:
  3201. call :KeyCheck
  3202. wmic path %sls% where version='%version%' call InstallProductKey ProductKey="%key%" >nul
  3203. if %errorlevel% equ 0 echo Successfully installed Product Key & echo: & echo For: %ver% %vera% & echo: & echo KEY: %key%
  3204. if %errorlevel% neq 0 echo Installing Product Key Failed.
  3205. call :FOOTER
  3206. timeout /t 5
  3207. goto:eof
  3208. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3209. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3210. :ActivateOnline
  3211. cls
  3212. call :ID
  3213. call :HEADER "OS-Version: %ver% found %vera%", "Activation-ID: %id%"
  3214. echo:
  3215. wmic path %slp% where ID='%id%' call Activate >nul
  3216. if %errorlevel% equ 0 echo: & echo Successfully activated: %ver% %vera%
  3217. if %errorlevel% neq 0 echo Activation Failed.
  3218. call :FOOTER
  3219. pause
  3220. goto:eof
  3221. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3222. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3223. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3224. ::OFFICE AUTO
  3225. :AutoactivateOffice14
  3226. call :Officex64 14, 1
  3227. call :Othersx64 14, 1, Project, project
  3228. call :Othersx64 14, 1, Visio, visio
  3229. if not defined office14present if not defined project14present if not defined visio14present goto:eof
  3230. cls
  3231. call :HEADER "Office 2010 Professional Plus %vera% found", "in path: %officepath1%"
  3232. echo:
  3233. set "port=1688"
  3234. call :Office14Activate
  3235. call :FOOTER
  3236. timeout /t 5
  3237. goto:eof
  3238. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3239. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3240. :AutoactivateOffice1464
  3241. call :Officex86 14, 1
  3242. call :Othersx86 14, 1, Project, project
  3243. call :Othersx86 14, 1, Visio, visio
  3244. if not defined office14present if not defined project14present if not defined visio14present goto:eof
  3245. cls
  3246. call :HEADER "Office 2010 Professional Plus x86 found", "in path: %officepath1%"
  3247. echo:
  3248. set "port=1688"
  3249. call :Office14Activate
  3250. call :FOOTER
  3251. timeout /t 5
  3252. goto:eof
  3253. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3254. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3255. :AutoactivateOffice15
  3256. call :Officex64 15, 2
  3257. call :Othersx64 15, 2, Project, project
  3258. call :Othersx64 15, 2, Visio, visio
  3259. if not defined office15present if not defined project15present if not defined visio15present goto:eof
  3260. cls
  3261. call :HEADER "Office 2013 Professional Plus %vera% found", "in path: %officepath2%"
  3262. echo:
  3263. set "port=1688"
  3264. call :Office15Activate "YC7DK-G2NP3-2QQC3-J6H88-GVGXT", 2013, 15
  3265. call :FOOTER
  3266. timeout /t 5
  3267. goto:eof
  3268. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3269. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3270. :AutoactivateOffice1564
  3271. call :Officex86 15, 2
  3272. call :Othersx86 15, 2, Project, project
  3273. call :Othersx86 15, 2, Visio, visio
  3274. if not defined office15present if not defined project15present if not defined visio15present goto:eof
  3275. cls
  3276. call :HEADER "Office 2013 Professional Plus x86 found", "in path: %officepath2%"
  3277. echo:
  3278. set "port=1688"
  3279. call :Office15Activate "YC7DK-G2NP3-2QQC3-J6H88-GVGXT", 2013, 15
  3280. call :FOOTER
  3281. timeout /t 5
  3282. goto:eof
  3283. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3284. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3285. :AutoactivateOffice16
  3286. call :CheckC2ROx64 16, 3, Common, office
  3287. call :CheckC2RPx64 16, 3, Project, project
  3288. call :CheckC2RVx64 16, 3, Visio, visio
  3289. if not defined office16present if not defined project16present if not defined visio16present goto:eof
  3290. cls
  3291. call :HEADER "Office 2016 Professional Plus %vera% found", "in path: %officepath3%"
  3292. echo:
  3293. set "port=1688"
  3294. call :Office15Activate "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99", 2016, 16
  3295. call :FOOTER
  3296. timeout /t 5
  3297. goto:eof
  3298. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3299. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3300. :AutoactivateOffice1664
  3301. call :CheckC2ROx86 16, 3, Common, office
  3302. call :CheckC2RPx86 16, 3, Project, project
  3303. call :CheckC2RVx86 16, 3, Visio, visio
  3304. if not defined office16present if not defined project16present if not defined visio16present goto:eof
  3305. cls
  3306. call :HEADER "Office 2016 Professional Plus x86 found", "in path: %officepath3%"
  3307. echo:
  3308. set "port=1688"
  3309. call :Office15Activate "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99", 2016, 16
  3310. call :FOOTER
  3311. timeout /t 5
  3312. goto:eof
  3313. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3314. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3315. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3316. ::OFFICE MANUAL
  3317. :Office14
  3318. call :Officex64 14, 1
  3319. call :Othersx64 14, 1, Project, project
  3320. call :Othersx64 14, 1, Visio, visio
  3321. if not defined office14present if not defined project14present if not defined visio14present goto:eof
  3322. cls
  3323. call :HEADER "Office 2010 Professional Plus %vera% found", "in path: %officepath1%"
  3324. call :OfficeInputMask
  3325. if "%trigger%"=="2" goto:eof
  3326. call :Office14Activate
  3327. call :FOOTER
  3328. timeout /t 5
  3329. goto:eof
  3330. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3331. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3332. :Office1464
  3333. call :Officex86 14, 1
  3334. call :Othersx86 14, 1, Project, project
  3335. call :Othersx86 14, 1, Visio, visio
  3336. if not defined office14present if not defined project14present if not defined visio14present goto:eof
  3337. cls
  3338. call :HEADER "Office 2010 Professional Plus x86 found", "in path: %officepath1%"
  3339. call :OfficeInputMask
  3340. if "%trigger%"=="2" goto:eof
  3341. call :Office14Activate
  3342. call :FOOTER
  3343. timeout /t 5
  3344. goto:eof
  3345. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3346. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3347. :Office15
  3348. call :Officex64 15, 2
  3349. call :Othersx64 15, 2, Project, project
  3350. call :Othersx64 15, 2, Visio, visio
  3351. if not defined office15present if not defined project15present if not defined visio15present goto:eof
  3352. cls
  3353. call :HEADER "Office 2013 Professional Plus %vera% found", "in path: %officepath2%"
  3354. call :OfficeInputMask
  3355. if "%trigger%"=="2" goto:eof
  3356. call :Office15Activate "YC7DK-G2NP3-2QQC3-J6H88-GVGXT", 2013, 15
  3357. call :FOOTER
  3358. timeout /t 5
  3359. goto:eof
  3360. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3361. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3362. :Office1564
  3363. call :Officex86 15, 2
  3364. call :Othersx86 15, 2, Project, project
  3365. call :Othersx86 15, 2, Visio, visio
  3366. if not defined office15present if not defined project15present if not defined visio15present goto:eof
  3367. cls
  3368. call :HEADER "Office 2013 Professional Plus x86 found", "in path: %officepath2%"
  3369. call :OfficeInputMask
  3370. if "%trigger%"=="2" goto:eof
  3371. call :Office15Activate "YC7DK-G2NP3-2QQC3-J6H88-GVGXT", 2013, 15
  3372. call :FOOTER
  3373. timeout /t 5
  3374. goto:eof
  3375. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3376. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3377. :Office16
  3378. call :CheckC2ROx64 16, 3, Common, office
  3379. call :CheckC2RPx64 16, 3, Project, project
  3380. call :CheckC2RVx64 16, 3, Visio, visio
  3381. if not defined office16present if not defined project16present if not defined visio16present goto:eof
  3382. cls
  3383. call :HEADER "Office 2016 Professional Plus %vera% found", "in path: %officepath3%"
  3384. call :OfficeInputMask
  3385. if "%trigger%"=="2" goto:eof
  3386. call :Office15Activate "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99", 2016, 16
  3387. call :FOOTER
  3388. timeout /t 5
  3389. goto:eof
  3390. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3391. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3392. :Office1664
  3393. call :CheckC2ROx86 16, 3, Common, office
  3394. call :CheckC2RPx86 16, 3, Project, project
  3395. call :CheckC2RVx86 16, 3, Visio, visio
  3396. if not defined office16present if not defined project16present if not defined visio16present goto:eof
  3397. cls
  3398. call :HEADER "Office 2016 Professional Plus x86 found", "in path: %officepath3%"
  3399. call :OfficeInputMask
  3400. if "%trigger%"=="2" goto:eof
  3401. call :Office15Activate "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99", 2016, 16
  3402. call :FOOTER
  3403. timeout /t 5
  3404. goto:eof
  3405. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3406. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3407. ::===============================================================================================================
  3408. ::C2R CHECK
  3409. :CheckC2ROx64
  3410. set "officepath%~2="
  3411. set "%~416arch="
  3412. set "office16present="
  3413. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" >nul 2>&1
  3414. if errorlevel 1 goto:eof
  3415. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3416. if errorlevel 1 goto:eof
  3417. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /v "InstallPath"') do set "officepathshort=%%b" >nul 2>&1
  3418. set "officepath%~2=%officepathshort%\Office%~1"
  3419. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" /v "ActiveConfiguration"') do set "prodrelid=%%b" >nul 2>&1
  3420. if exist "%officepath3%\ospp.vbs" (
  3421. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\ProplusRetail.16" >nul 2>&1
  3422. if "%errorlevel%"=="0" set "office16present=positive"
  3423. )
  3424. if not exist "%officepath3%\ospp.vbs" (
  3425. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\ProfessionalRetail.16" >nul 2>&1
  3426. if "%errorlevel%"=="0" set "office16present=positive"
  3427. )
  3428. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do set "%~416arch=x64" >nul 2>&1
  3429. goto:eof
  3430. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3431. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3432. :CheckC2RPx64
  3433. set "%~416arch="
  3434. set "project16present="
  3435. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" >nul 2>&1
  3436. if errorlevel 1 goto:eof
  3437. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3438. if errorlevel 1 goto:eof
  3439. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" /v "ActiveConfiguration"') do set "prodrelid=%%b" >nul 2>&1
  3440. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\ProjectProRetail.16" >nul 2>&1
  3441. if "%errorlevel%"=="0" set "project16present=positive"
  3442. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /v "InstallPath"') do set "officepathshort=%%b" >nul 2>&1
  3443. set "officepath%~2=%officepathshort%\Office%~1"
  3444. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do set "%~416arch=x64" >nul 2>&1
  3445. goto:eof
  3446. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3447. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3448. :CheckC2RVx64
  3449. set "%~416arch="
  3450. set "visio16present="
  3451. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" >nul 2>&1
  3452. if errorlevel 1 goto:eof
  3453. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3454. if errorlevel 1 goto:eof
  3455. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" /v "ActiveConfiguration"') do set "prodrelid=%%b" >nul 2>&1
  3456. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\VisioProRetail.16" >nul 2>&1
  3457. if "%errorlevel%"=="0" set "visio16present=positive"
  3458. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /v "InstallPath"') do set "officepathshort=%%b" >nul 2>&1
  3459. set "officepath%~2=%officepathshort%\Office%~1"
  3460. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do set "%~416arch=x64" >nul 2>&1
  3461. goto:eof
  3462. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3463. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3464. :CheckC2ROx86
  3465. set "officepath%~2="
  3466. set "%~416arch="
  3467. set "office16present="
  3468. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" >nul 2>&1
  3469. if errorlevel 1 goto:eof
  3470. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3471. if errorlevel 1 goto:eof
  3472. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /v "InstallPath"') do set "officepathshort=%%b" >nul 2>&1
  3473. set "officepath%~2=%officepathshort%\Office%~1"
  3474. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" /v "ActiveConfiguration"') do set "prodrelid=%%b" >nul 2>&1
  3475. if exist "%officepath3%\ospp.vbs" (
  3476. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\ProplusRetail.16" >nul 2>&1
  3477. if "%errorlevel%"=="0" set "office16present=positive"
  3478. )
  3479. if not exist "%officepath3%\ospp.vbs" (
  3480. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\ProfessionalRetail.16" >nul 2>&1
  3481. if "%errorlevel%"=="0" set "office16present=positive"
  3482. )
  3483. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do set "%~416arch=x64" >nul 2>&1
  3484. goto:eof
  3485. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3486. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3487. :CheckC2RPx86
  3488. set "%~416arch="
  3489. set "project16present="
  3490. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" >nul 2>&1
  3491. if errorlevel 1 goto:eof
  3492. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3493. if errorlevel 1 goto:eof
  3494. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" /v "ActiveConfiguration"') do set "prodrelid=%%b" >nul 2>&1
  3495. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\ProjectProRetail.16" >nul 2>&1
  3496. if "%errorlevel%"=="0" set "project16present=positive"
  3497. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /v "InstallPath"') do set "officepathshort=%%b" >nul 2>&1
  3498. set "officepath%~2=%officepathshort%\Office%~1"
  3499. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do set "%~416arch=x86" >nul 2>&1
  3500. goto:eof
  3501. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3502. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3503. :CheckC2RVx86
  3504. set "%~416arch="
  3505. set "visio16present="
  3506. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" >nul 2>&1
  3507. if errorlevel 1 goto:eof
  3508. reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3509. if errorlevel 1 goto:eof
  3510. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs" /v "ActiveConfiguration"') do set "prodrelid=%%b" >nul 2>&1
  3511. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\ProductReleaseIDs\%prodrelid%\VisioProRetail.16" >nul 2>&1
  3512. if "%errorlevel%"=="0" set "visio16present=positive"
  3513. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun" /v "InstallPath"') do set "officepathshort=%%b" >nul 2>&1
  3514. set "officepath%~2=%officepathshort%\Office%~1"
  3515. FOR /F "tokens=2*" %%a IN ('reg query "HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do set "%~416arch=x86" >nul 2>&1
  3516. goto:eof
  3517. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3518. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3519. :Officex64
  3520. set "officepath%~2="
  3521. set "office%~1present="
  3522. set "visio%~1present="
  3523. set "project%~1present="
  3524. if %~1 equ 14 set "ostring=90140000-0011-0000-1000-0000000FF1CE"
  3525. if %~1 equ 14 set "pstring=90140000-003B-0000-1000-0000000FF1CE"
  3526. if %~1 equ 14 set "vstring=90140000-0057-0000-1000-0000000FF1CE"
  3527. if %~1 equ 15 set "ostring=90150000-0011-0000-1000-0000000FF1CE"
  3528. if %~1 equ 15 set "pstring=91150000-003B-0000-1000-0000000FF1CE"
  3529. if %~1 equ 15 set "vstring=91150000-0051-0000-1000-0000000FF1CE"
  3530. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%~1.0\Common\InstallRoot" >nul 2>&1
  3531. if errorlevel 1 goto:eof
  3532. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%~1.0\Common\Config\{%ostring%}" >nul 2>&1
  3533. if "%errorlevel%"=="0" set "office%~1present=positive"
  3534. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%~1.0\Common\Config\{%pstring%}" >nul 2>&1
  3535. if "%errorlevel%"=="0" set "project%~1present=positive"
  3536. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%~1.0\Common\Config\{%vstring%}" >nul 2>&1
  3537. if "%errorlevel%"=="0" set "visio%~1present=positive"
  3538. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%~1.0\Common\InstallRoot" /v "Path"') do (SET officepath%~2=%%b) >nul 2>&1
  3539. goto:eof
  3540. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3541. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3542. :Officex86
  3543. set "officepath%~2="
  3544. set "office%~1present="
  3545. set "visio%~1present="
  3546. set "project%~1present="
  3547. if %~1 equ 14 set "ostring=90140000-0011-0000-0000-0000000FF1CE"
  3548. if %~1 equ 14 set "pstring=90140000-003B-0000-0000-0000000FF1CE"
  3549. if %~1 equ 14 set "vstring=90140000-0057-0000-0000-0000000FF1CE"
  3550. if %~1 equ 15 set "ostring=90150000-0011-0000-0000-0000000FF1CE"
  3551. if %~1 equ 15 set "pstring=91150000-003B-0000-0000-0000000FF1CE"
  3552. if %~1 equ 15 set "vstring=91150000-0051-0000-0000-0000000FF1CE"
  3553. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%~1.0\Common\InstallRoot" >nul 2>&1
  3554. if errorlevel 1 goto:eof
  3555. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%~1.0\Common\Config\{%ostring%}" >nul 2>&1
  3556. if "%errorlevel%"=="0" set "office%~1present=positive"
  3557. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%~1.0\Common\Config\{%pstring%}" >nul 2>&1
  3558. if "%errorlevel%"=="0" set "project%~1present=positive"
  3559. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%~1.0\Common\Config\{%vstring%}" >nul 2>&1
  3560. if "%errorlevel%"=="0" set "visio%~1present=positive"
  3561. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%~1.0\Common\InstallRoot" /v "Path"') do (SET officepath%~2=%%b) >nul 2>&1
  3562. goto:eof
  3563. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3564. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3565. :Othersx86
  3566. set "%~4%~1path="
  3567. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3568. if errorlevel 1 goto:eof
  3569. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do (SET %~4%~1path=%%b) >nul 2>&1
  3570. goto:eof
  3571. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3572. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3573. :Othersx64
  3574. set "%~4%~1path="
  3575. reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%~1.0\%~3\InstallRoot" >nul 2>&1
  3576. if errorlevel 1 goto:eof
  3577. FOR /F "tokens=2*" %%a IN ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%~1.0\%~3\InstallRoot" /v "Path"') do (SET %~4%~1path=%%b) >nul 2>&1
  3578. goto:eof
  3579. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3580. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3581. :OfficeInputMask
  3582. echo:
  3583. CHOICE /C AS /M " [A]ctivate or [S]kip ? : "
  3584. if %errorlevel%==1 (set trigger=1)&&(goto :AOfurther)
  3585. if %errorlevel%==2 (set trigger=2)&&(goto :eof)
  3586. :AOfurther
  3587. call :FOOTER
  3588. if %win% lss 9200 if /i "%host%"=="" set "host=127.0.0.2"
  3589. set "port=1688"
  3590. echo Default: %host%
  3591. echo Default: %port%
  3592. call :FOOTER
  3593. set /p host=Set host ^>
  3594. set /p port=Set port ^>
  3595. cls
  3596. call :HEADER "ACTIVATING ...", ""
  3597. :AOInputEnd
  3598. goto:eof
  3599. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3600. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3601. :Office15Activate
  3602. set ospp=OfficeSoftwareProtectionProduct
  3603. set osps=OfficeSoftwareProtectionService
  3604. set slp=SoftwareLicensingProduct
  3605. set sls=SoftwareLicensingService
  3606. set spp=SoftwareProtectionProduct
  3607. if %win% geq 9200 (call :OID "%slp%", %~3) else (call :OID "%ospp%", %~3)
  3608. if %win% GEQ 9200 if defined office%~3present call :OfficeGVLKInstall "%sls%", "%~1"
  3609. if %win% lss 9200 if defined office%~3present call :OfficeGVLKInstall "%osps%", "%~1"
  3610. if %win% GEQ 9200 if defined visio15present call :OfficeGVLKInstall "%sls%", "C2FG9-N6J68-H8BTJ-BW3QX-RM3B3"
  3611. if %win% lss 9200 if defined visio15present call :OfficeGVLKInstall "%osps%", "C2FG9-N6J68-H8BTJ-BW3QX-RM3B3"
  3612. if %win% GEQ 9200 if defined project15present call :OfficeGVLKInstall "%sls%", "FN8TT-7WMH6-2D4X9-M337T-2342K"
  3613. if %win% lss 9200 if defined project15present call :OfficeGVLKInstall "%osps%", "FN8TT-7WMH6-2D4X9-M337T-2342K"
  3614. if %win% GEQ 9200 if defined visio16present call :OfficeGVLKInstall "%sls%", "PD3PC-RHNGV-FXJ29-8JK7D-RJRJK"
  3615. if %win% lss 9200 if defined visio16present call :OfficeGVLKInstall "%osps%", "PD3PC-RHNGV-FXJ29-8JK7D-RJRJK"
  3616. if %win% GEQ 9200 if defined project16present call :OfficeGVLKInstall "%sls%", "YG9NW-3K39V-2T3HJ-93F3Q-G83KT"
  3617. if %win% lss 9200 if defined project16present call :OfficeGVLKInstall "%osps%", "YG9NW-3K39V-2T3HJ-93F3Q-G83KT"
  3618. call :FOOTER
  3619. if %win% GEQ 9200 call :OfficeHostAndPort "%sls%"
  3620. if %win% lss 9200 call :OfficeHostAndPort "%osps%"
  3621. call :FOOTER
  3622. if %win% GEQ 9200 if defined office%~3present call :OfficeActLoop "%slp%", %~2
  3623. if %win% LSS 9200 if defined office%~3present call :OfficeActLoop "%ospp%", %~2
  3624. if %win% GEQ 9200 if defined visio15present call :OthersActLoop "%slp%", "e13ac10e-75d0-4aff-a0cd-764982cf541c", Visio, 20%~3
  3625. if %win% LSS 9200 if defined visio15present call :OthersActLoop "%ospp%", "e13ac10e-75d0-4aff-a0cd-764982cf541c", Visio, 20%~3
  3626. if %win% GEQ 9200 if defined project15present call :OthersActLoop "%slp%", "4a5d124a-e620-44ba-b6ff-658961b33b9a", Project, 20%~3
  3627. if %win% LSS 9200 if defined project15present call :OthersActLoop "%ospp%", "4a5d124a-e620-44ba-b6ff-658961b33b9a", Project, 20%~3
  3628. if %win% GEQ 9200 if defined visio16present call :OthersActLoop "%slp%", "6bf301c1-b94a-43e9-ba31-d494598c47fb", Visio, 20%~3
  3629. if %win% LSS 9200 if defined visio16present call :OthersActLoop "%ospp%", "6bf301c1-b94a-43e9-ba31-d494598c47fb", Visio, 20%~3
  3630. if %win% GEQ 9200 if defined project16present call :OthersActLoop "%slp%", "4f414197-0fc2-4c01-b68a-86cbb9ac254c", Project, 20%~3
  3631. if %win% LSS 9200 if defined project16present call :OthersActLoop "%ospp%", "4f414197-0fc2-4c01-b68a-86cbb9ac254c", Project, 20%~3
  3632. if %win% GEQ 9200 call :OfficeActivateCleanup "%sls%", "%oid2%"
  3633. if %win% LSS 9200 call :OfficeActivateCleanup "%osps%", "%oid2%"
  3634. goto:eof
  3635. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3636. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3637. :Office14Activate
  3638. set ospp=OfficeSoftwareProtectionProduct
  3639. set osps=OfficeSoftwareProtectionService
  3640. call :OID "%ospp%", OfficeProPlus
  3641. call :OfficeGVLKInstall "%osps%", "VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB"
  3642. if defined project14present call :OfficeGVLKInstall "%osps%", "GX6F-PGV49-PGW3J-9BTGG-VHKC6"
  3643. if defined visio14present call :OfficeGVLKInstall "%osps%", "7MCW8-VRQVK-G677T-PDJCM-Q8TCP"
  3644. call :FOOTER
  3645. call :OfficeHostAndPort "%osps%"
  3646. call :OfficeActLoop "%ospp%", 2010
  3647. call :FOOTER
  3648. if defined project14present call :OthersActLoop "%ospp%", "df133ff7-bf14-4f95-afe3-7b48e7e331ef", Project, 2010
  3649. if defined visio14present call :OthersActLoop "%ospp%", "e558389c-83c3-4b29-adfe-5e4d7f46c358", Visio, 2010
  3650. call :OfficeActivateCleanup "%osps%", "%oid1%"
  3651. goto:eof
  3652. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3653. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3654. :OfficeGVLKInstall
  3655. wmic path %~1 where version='%version%' call InstallProductKey ProductKey="%~2" >nul 2>&1
  3656. if %errorlevel% equ 0 echo: & echo Successfully installed %~2. & echo:
  3657. if %errorlevel% neq 0 echo: & echo Installing %~2 Failed. & echo:
  3658. goto:eof
  3659. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3660. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3661. :OfficeHostAndPort
  3662. wmic path %~1 where version='%version%' call SetKeyManagementServiceMachine MachineName="%host%" >nul 2>&1
  3663. if %errorlevel% equ 0 echo: & echo Successfully changed IP to %host%. & echo:
  3664. if %errorlevel% neq 0 echo: & echo Setting IP to %host% Failed.
  3665. wmic path %~1 where version='%version%' call SetKeyManagementServicePort %port% >nul 2>&1
  3666. if %errorlevel% equ 0 echo: & echo Successfully changed Port to %port%. & echo:
  3667. if %errorlevel% neq 0 echo: & echo Setting Port to %port% Failed. & echo:
  3668. goto:eof
  3669. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3670. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3671. :OfficeActLoop
  3672. wmic path %~1 where ID='%oid%' call Activate >nul 2>&1
  3673. if %errorlevel% equ 0 echo: & echo Successfully activated: Office %~2 Professional Plus.
  3674. if %errorlevel% neq 0 echo: & echo Activation Failed.
  3675. goto:eof
  3676. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3677. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3678. :OthersActLoop
  3679. wmic path %~1 where ID='%~2' call Activate >nul 2>&1
  3680. if %errorlevel% equ 0 echo: & echo Successfully activated: %~3 %~4 Professional Plus.
  3681. if %errorlevel% neq 0 echo: & echo Activation Failed.
  3682. goto:eof
  3683. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3684. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3685. :OfficeActivateCleanup
  3686. wmic path %~1 where ID='%~2' call ClearKeyManagementServiceMachine >nul 2>&1
  3687. wmic path %~1 where ID='%~2' call ClearKeyManagementServicePort >nul 2>&1
  3688. wmic path %~1 where ID='%~2' call DisableKeyManagementServiceDnsPublishing 1 >nul 2>&1
  3689. wmic path %~1 where ID='%~2 call DisableKeyManagementServiceHostCaching 1 >nul 2>&1
  3690. goto:eof
  3691. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3692. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3693. :Office15ConversionLoop
  3694. set slp=SoftwareLicensingProduct
  3695. set sls=SoftwareLicensingService
  3696. set spp=SoftwareProtectionProduct
  3697. if defined office15present call :ConvertOffice15 proplus
  3698. if defined project15present call :ConvertOffice15 project
  3699. if defined visio15present call :ConvertOffice15 visio
  3700. call :HEADER " INSTALLING GVLK"
  3701. if defined office15present call :OfficeGVLKInstall "%sls%", "YC7DK-G2NP3-2QQC3-J6H88-GVGXT"
  3702. if defined project15present call :OfficeGVLKInstall "%sls%", "FN8TT-7WMH6-2D4X9-M337T-2342K"
  3703. if defined visio15present call :OfficeGVLKInstall "%sls%", "C2FG9-N6J68-H8BTJ-BW3QX-RM3B3"
  3704. call :FOOTER
  3705. timeout /t 5
  3706. if %win% geq 9200 call :Uninstall15Auto
  3707. goto:eof
  3708. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3709. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3710. :Office16ConversionLoop
  3711. set ospp=OfficeSoftwareProtectionProduct
  3712. set osps=OfficeSoftwareProtectionService
  3713. set slp=SoftwareLicensingProduct
  3714. set sls=SoftwareLicensingService
  3715. set spp=SoftwareProtectionProduct
  3716. if defined office16present call :ConvertOffice16 "%~1"
  3717. if defined project16present call :ConvertProject16 "%~1"
  3718. if defined visio16present call :ConvertVisio16 "%~1"
  3719. if defined office16present call :ConvertGeneral16 "%~1"
  3720. cls
  3721. call :HEADER "INSTALLING GVLK"
  3722. if %win% GEQ 9200 if defined office16present call :OfficeGVLKInstall "%sls%", "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99"
  3723. if %win% LSS 9200 if defined office16present call :OfficeGVLKInstall "%osps%", "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99"
  3724. if %win% GEQ 9200 if defined project16present call :OfficeGVLKInstall "%sls%", "YG9NW-3K39V-2T3HJ-93F3Q-G83KT"
  3725. if %win% LSS 9200 if defined project16present call :OfficeGVLKInstall "%osps%", "YG9NW-3K39V-2T3HJ-93F3Q-G83KT"
  3726. if %win% GEQ 9200 if defined visio16present call :OfficeGVLKInstall "%sls%", "PD3PC-RHNGV-FXJ29-8JK7D-RJRJK"
  3727. if %win% LSS 9200 if defined visio16present call :OfficeGVLKInstall "%osps%", "PD3PC-RHNGV-FXJ29-8JK7D-RJRJK"
  3728. call :FOOTER
  3729. timeout /t 5
  3730. if %win% geq 9200 call :Uninstall16Auto
  3731. goto:eof
  3732. :================================================================================================================
  3733. ::===============================================================================================================
  3734. ::CONVERT 15
  3735. :Uninstall15Auto
  3736. cls
  3737. call :HEADER "UNINSTALLING RETAIL LICENSES"
  3738. if defined office15present cscript "%windir%\system32\slmgr.vbs" /upk 1b686580-9fb1-4b88-bfba-eae7c0da31ad | findstr /i /c:":" >nul 2>&1
  3739. if "%errorlevel%"=="1" (echo Successfully uninstalled OfficeProPlusR_Grace)&&(echo:)
  3740. if defined office15present cscript "%windir%\system32\slmgr.vbs" /upk db56dec3-34f2-4bc5-a7b9-ecc3cc51c12a | findstr /i /c:":" >nul 2>&1
  3741. if "%errorlevel%"=="1" (echo Successfully uninstalled OfficeProPlusR_Trial)&&(echo:)
  3742. if defined project15present cscript "%windir%\system32\slmgr.vbs" /upk 41937580-5ddd-4806-9089-5266d567219f | findstr /i /c:":" >nul 2>&1
  3743. if "%errorlevel%"=="1" (echo Successfully uninstalled OfficeProjectProR_Trial)&&(echo:)
  3744. if defined project15present cscript "%windir%\system32\slmgr.vbs" /upk ae7b1e26-3aee-4fe3-9c5b-88f05e36cd34 | findstr /i /c:":" >nul 2>&1
  3745. if "%errorlevel%"=="1" (echo Successfully uninstalled OfficeProjectProR_Grace)&&(echo:)
  3746. if defined visio15present cscript "%windir%\system32\slmgr.vbs" /upk 024ea285-2685-48bc-87ef-79b48cc8c027 | findstr /i /c:":" >nul 2>&1
  3747. if "%errorlevel%"=="1" (echo Successfully uninstalled OfficeVisioProR_Grace)&&(echo:)
  3748. if defined visio15present cscript "%windir%\system32\slmgr.vbs" /upk f35e39c1-a41f-47c9-a204-2ca3c4b13548 | findstr /i /c:":" >nul 2>&1
  3749. if "%errorlevel%"=="1" (echo Successfully uninstalled OfficeVisioProR_Trial)&&(echo:)
  3750. call :FOOTER
  3751. goto:eof
  3752. :================================================================================================================
  3753. ::===============================================================================================================
  3754. ::CONVERT 16
  3755. :Uninstall16Auto
  3756. cls
  3757. call :HEADER "UNINSTALLING RETAIL LICENSES"
  3758. if defined office16present cscript "%windir%\system32\slmgr.vbs" /upk 7a0560c5-21ed-4518-ad41-b7f870b9fd1a | findstr /i /c:":" >nul 2>&1
  3759. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16ProfessionalR_Grace)&&(echo:)
  3760. if defined office16present cscript "%windir%\system32\slmgr.vbs" /upk 39a1be8c-9e7f-4a75-81f4-21cfac7cbecb | findstr /i /c:":" >nul 2>&1
  3761. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16ProfessionalR_Trial)&&(echo:)
  3762. if defined office16present cscript "%windir%\system32\slmgr.vbs" /upk 70d9ceb6-6dfa-4da4-b413-18c1c3c76e2e | findstr /i /c:":" >nul 2>&1
  3763. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16ProPlusR_Grace)&&(echo:)
  3764. if defined office16present cscript "%windir%\system32\slmgr.vbs" /upk c8ce6adc-ede7-4ce2-8e7b-c49f462ab8c3 | findstr /i /c:":" >nul 2>&1
  3765. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16ProPlusR_Trial)&&(echo:)
  3766. if defined project16present cscript "%windir%\system32\slmgr.vbs" /upk aeedf8f7-8832-41b1-a9c8-13f2991a371c | findstr /i /c:":" >nul 2>&1
  3767. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16ProjectProR_Trial)&&(echo:)
  3768. if defined project16present cscript "%windir%\system32\slmgr.vbs" /upk ca5b3eea-c055-4acf-bc78-187db21c7db5 | findstr /i /c:":" >nul 2>&1
  3769. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16ProjectProR_Grace)&&(echo:)
  3770. if defined visio16present cscript "%windir%\system32\slmgr.vbs" /upk 5821ec16-77a9-4404-99c8-2756dc6d4c3c | findstr /i /c:":" >nul 2>&1
  3771. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16VisioProR_Grace&&(echo:)
  3772. if defined visio16present cscript "%windir%\system32\slmgr.vbs" /upk a17f9ed0-c3d4-4873-b3b8-d7e049b459ec | findstr /i /c:":" >nul 2>&1
  3773. if "%errorlevel%"=="1" (echo Successfully uninstalled Office16VisioProR_Trial)&&(echo:)
  3774. call :FOOTER
  3775. goto:eof
  3776. :================================================================================================================
  3777. ::===============================================================================================================
  3778. ::CONVERT 15
  3779. :ConvertOffice15
  3780. pushd %~dp0
  3781. for /r "files\officefixes\15\%~1" %%x in (*.xrm-ms) do cscript "%windir%\system32\slmgr.vbs" /ilc "%%x"
  3782. call :HEADER "REGISTRATING"
  3783. reg import "files\officefixes\15\%~1\%~1.reg"
  3784. echo:
  3785. goto:eof
  3786. :================================================================================================================
  3787. ::===============================================================================================================
  3788. ::CONVERT 16
  3789. :ConvertOffice16
  3790. cls
  3791. call :HEADER "Office 2016 Professional Plus x86 found", ""
  3792. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProPlusVL_KMS_Client-ppd.xrm-ms"
  3793. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProPlusVL_KMS_Client-ul.xrm-ms"
  3794. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProPlusVL_KMS_Client-ul-oob.xrm-ms"
  3795. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProPlusVL_MAK-pl.xrm-ms"
  3796. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProPlusVL_MAK-ppd.xrm-ms"
  3797. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProPlusVL_MAK-ul-oob.xrm-ms"
  3798. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProPlusVL_MAK-ul-phn.xrm-ms"
  3799. call :FOOTER
  3800. timeout /t 3
  3801. goto:eof
  3802. ::===============================================================================================================
  3803. :ConvertProject16
  3804. cls
  3805. call :HEADER "Project 2016 Professional Plus x86 found", ""
  3806. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProjectProVL_KMS_Client-ppd.xrm-ms"
  3807. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProjectProVL_KMS_Client-ul-oob.xrm-ms"
  3808. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProjectProVL_KMS_Client-ul.xrm-ms"
  3809. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProjectProVL_MAK-pl.xrm-ms"
  3810. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProjectProVL_MAK-ppd.xrm-ms"
  3811. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProjectProVL_MAK-ul-oob.xrm-ms"
  3812. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\ProjectProVL_MAK-ul-phn.xrm-ms"
  3813. call :FOOTER
  3814. timeout /t 3
  3815. goto:eof
  3816. ::===============================================================================================================
  3817. :ConvertVisio16
  3818. cls
  3819. call :HEADER "Visio 2016 Professional Plus x86 found", ""
  3820. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\VisioProVL_KMS_Client-ppd.xrm-ms"
  3821. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\VisioProVL_KMS_Client-ul-oob.xrm-ms"
  3822. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\VisioProVL_KMS_Client-ul.xrm-ms"
  3823. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\VisioProVL_MAK-pl.xrm-ms"
  3824. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\VisioProVL_MAK-ppd.xrm-ms"
  3825. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\VisioProVL_MAK-ul-oob.xrm-ms"
  3826. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\VisioProVL_MAK-ul-phn.xrm-ms"
  3827. call :FOOTER
  3828. timeout /t 3
  3829. goto:eof
  3830. ::===============================================================================================================
  3831. :ConvertGeneral16
  3832. cls
  3833. call :HEADER "Office 2016 Professional Plus x86 found", ""
  3834. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\client-issuance-bridge-office.xrm-ms"
  3835. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\client-issuance-root.xrm-ms"
  3836. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\client-issuance-root-bridge-test.xrm-ms"
  3837. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\client-issuance-stil.xrm-ms"
  3838. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\client-issuance-ul.xrm-ms"
  3839. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\client-issuance-ul-oob.xrm-ms"
  3840. cscript "%windir%\system32\slmgr.vbs" /ilc "%~1\Microsoft Office\root\Licenses16\pkeyconfig-office.xrm-ms"
  3841. call :FOOTER
  3842. timeout /t 3
  3843. goto:eof
  3844. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3845. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3846. :TaskCreate
  3847. SCHTASKS /Create /TN "Reactivate Service DAILY" /TR "%windir%\%name%\reactivate.cmd" /SC DAILY /MO 1 /RU SYSTEM /RL Highest /F
  3848. SCHTASKS /Create /TN "Reactivate Service ONLOGON" /TR "%windir%\%name%\reactivate.cmd" /SC ONLOGON /RU SYSTEM /RL Highest /F
  3849. SCHTASKS /Create /TN "Reactivate Service ONSTART" /TR "%windir%\%name%\reactivate.cmd" /SC ONSTART /RU SYSTEM /RL Highest /F
  3850. goto:eof
  3851. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3852. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3853. :WriteA
  3854. set ospp=OfficeSoftwareProtectionProduct
  3855. set osps=OfficeSoftwareProtectionService
  3856. set slp=SoftwareLicensingProduct
  3857. set sls=SoftwareLicensingService
  3858. >%windir%\%name%\reactivate.cmd (
  3859. echo @echo off
  3860. echo ::-------------------------------------------------------------------------------
  3861. echo :: Code by s1ave77
  3862. echo :: Re-activation Task script created: %date% at %time%
  3863. echo ::-------------------------------------------------------------------------------
  3864. echo ::HOST AND PORT SET
  3865. if exist "%SystemRoot%\%name%\%name%.exe" echo start /min cmd /c "%windir%\KMSServer\KMSServer.exe"
  3866. echo wmic path %sls% where version='%version%' call SetKeyManagementServiceMachine MachineName="%host%" ^>nul
  3867. echo wmic path %sls% where version='%version%' call SetKeyManagementServicePort %port% ^>nul
  3868. )
  3869. goto:eof
  3870. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3871. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3872. :WriteWindows
  3873. call :ID
  3874. >>%windir%\%name%\reactivate.cmd (
  3875. echo ::-------------------------------------------------------------------------------
  3876. echo ::WINDOWS ACTIVATION
  3877. echo wmic path %slp% where ID='%id%' call Activate ^>nul
  3878. )
  3879. goto:eof
  3880. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3881. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3882. :WriteOffice14
  3883. if defined office14present call :OID "%ospp%", OfficeProPlus
  3884. >>"%windir%\%name%\reactivate.cmd" (
  3885. echo ::-------------------------------------------------------------------------------
  3886. echo ::OFFICE 14 ACTIVATION
  3887. if defined office14present echo wmic path %ospp% where ID='%oid%' call Activate ^>nul
  3888. )
  3889. goto:WriteOthers
  3890. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3891. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3892. :WriteOffice15
  3893. if %win% GEQ 9200 if defined office15present call :OID "%slp%", OfficeProPlus
  3894. if %win% LSS 9200 if defined office15present call :OID "%ospp%", OfficeProPlus
  3895. >>"%windir%\%name%\reactivate.cmd" (
  3896. echo ::-------------------------------------------------------------------------------
  3897. echo ::OFFICE 15 ACTIVATION
  3898. if defined office15present if %win% GEQ 9200 echo wmic path %slp% where ID='%oid%' call Activate ^>nul
  3899. if defined office15present if %win% LSS 9200 echo wmic path %ospp% where ID='%oid%' call Activate ^>nul
  3900. )
  3901. goto:WriteOthers
  3902. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3903. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3904. :WriteOffice16
  3905. if defined office16present if %win% GEQ 9200 call :OID "%slp%", Office16ProPlus
  3906. if defined office16present if %win% LSS 9200 call :OID "%ospp%", Office16ProPlus
  3907. >>"%windir%\%name%\reactivate.cmd" (
  3908. echo ::-------------------------------------------------------------------------------
  3909. echo ::OFFICE 16 ACTIVATION
  3910. if defined office16present if %win% GEQ 9200 echo wmic path %slp% where ID='%oid%' call Activate ^>nul
  3911. if defined office16present if %win% LSS 9200 echo wmic path %ospp% where ID='%oid%' call Activate ^>nul
  3912. )
  3913. goto:WriteOthers
  3914. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3915. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3916. :WriteOthers
  3917. set "p14=df133ff7-bf14-4f95-afe3-7b48e7e331ef"
  3918. set "v14=e558389c-83c3-4b29-adfe-5e4d7f46c358"
  3919. set "p15=4a5d124a-e620-44ba-b6ff-658961b33b9a"
  3920. set "v15=e13ac10e-75d0-4aff-a0cd-764982cf541c"
  3921. set "p16=4f414197-0fc2-4c01-b68a-86cbb9ac254c"
  3922. set "v16=6bf301c1-b94a-43e9-ba31-d494598c47fb"
  3923. >>"%windir%\%name%\reactivate.cmd" (
  3924. echo ::-------------------------------------------------------------------------------
  3925. echo ::PROJECT AND VISIO ACTIVATION
  3926. if %win% GEQ 9200 if defined project14present echo wmic path %slp% where ID='%p14%' call Activate ^>nul
  3927. if %win% LSS 9200 if defined project14present echo wmic path %ospp% where ID='%p14%' call Activate ^>nul
  3928. if %win% GEQ 9200 if defined project15present echo wmic path %slp% where ID='%p15%' call Activate ^>nul
  3929. if %win% LSS 9200 if defined project15present echo wmic path %ospp% where ID='%p15%' call Activate ^>nul
  3930. if %win% GEQ 9200 if defined project16present echo wmic path %slp% where ID='%p16%' call Activate ^>nul
  3931. if %win% LSS 9200 if defined project16present echo wmic path %ospp% where ID='%p16%' call Activate ^>nul
  3932. if %win% GEQ 9200 if defined visio14present echo wmic path %slp% where ID='%v14%' call Activate ^>nul
  3933. if %win% LSS 9200 if defined visio14present echo wmic path %ospp% where ID='%v14%' call Activate ^>nul
  3934. if %win% GEQ 9200 if defined visio15present echo wmic path %slp% where ID='%v15%' call Activate ^>nul
  3935. if %win% LSS 9200 if defined visio15present echo wmic path %ospp% where ID='%v15%' call Activate ^>nul
  3936. if %win% GEQ 9200 if defined visio16present echo wmic path %slp% where ID='%v16%' call Activate ^>nul
  3937. if %win% LSS 9200 if defined visio16present echo wmic path %ospp% where ID='%v16%' call Activate ^>nul
  3938. )
  3939. goto:eof
  3940. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3941. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3942. :WriteOthersCleanup
  3943. >>"%windir%\%name%\reactivate.cmd" (
  3944. echo ::-------------------------------------------------------------------------------
  3945. echo ::HOST AND PORT CLEANSING
  3946. echo wmic path %sls% where version='%version%' call ClearKeyManagementServiceMachine ^>nul 2^>^&1
  3947. echo wmic path %sls% where version='%version%' call ClearKeyManagementServicePort ^>nul 2^>^&1
  3948. echo wmic path %sls% where version='%version%' call DisableKeyManagementServiceDnsPublishing 1 ^>nul 2^>^&1
  3949. echo wmic path %sls% where version='%version%' call DisableKeyManagementServiceHostCaching 1 ^>nul 2^>^&1
  3950. )
  3951. goto:eof
  3952. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3953. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3954. :WriteZ
  3955. >>"%windir%\%name%\reactivate.cmd" (
  3956. echo ::-------------------------------------------------------------------------------
  3957. if exist "%SystemRoot%\%name%\%name%.exe" echo TASKKILL /F /IM "%name%.exe" ^>nul
  3958. echo exit
  3959. )
  3960. goto:eof
  3961. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3962. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3963. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3964. ::SERVICE AUTO INSTALLS
  3965. :QADAutoInstall
  3966. if not %win% GEQ 9200 call :NotSupported
  3967. if not %win% GEQ 9200 goto:eof
  3968. cls
  3969. call :HEADER "This option installs the Hook and Server by QAD", " "
  3970. echo:
  3971. set Kms1Name=KMS-QADhooker
  3972. if exist "%SystemRoot%\System32\%Kms1Name%.*" call :FoundHAuto
  3973. if exist "%SystemRoot%\System32\%Kms1Name%.*" goto:eof
  3974. call "files\hook\install.cmd"
  3975. pushd "%~dp0"
  3976. goto:eof
  3977. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3978. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3979. :QADAutoUnInstall
  3980. cls
  3981. call :HEADER "This option uninstalls the Hook and Server by QAD", " "
  3982. echo:
  3983. set Kms1Name=KMS-QADhooker
  3984. if not exist "%SystemRoot%\System32\%Kms1Name1%.*" call :NotFoundHAuto
  3985. if not exist "%SystemRoot%\System32\%Kms1Name%.*" goto:eof
  3986. call "files\hook\uninstall.cmd"
  3987. pushd "%~dp0"
  3988. goto:eof
  3989. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3990. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3991. :FoundHAuto
  3992. echo %Kms1Name% is already installed.
  3993. call :FOOTER
  3994. timeout /t 3
  3995. goto:eof
  3996. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3997. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3998. :NotFoundHAuto
  3999. echo %Kms1Name% not installed.
  4000. call :FOOTER
  4001. timeout /t 3
  4002. goto:eof
  4003. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4004. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4005. :AutoSppExtComObjPatch
  4006. cls
  4007. call :HEADER "This option installs the SppExtComObjPatcher Hook", " "
  4008. echo:
  4009. wmic path OfficeSoftwareProtectionService get version >nul 2>&1 || set OsppHook=0
  4010.  
  4011. if %win% GEQ 9200 (
  4012. set OSType=Win8
  4013. ) else if %win% GEQ 7600 (
  4014. set OSType=Win7
  4015. ) else (
  4016. goto :UnsupportedVersion
  4017. )
  4018. echo.
  4019. echo Microsoft (R) Windows Software Licensing.
  4020. echo Copyright (C) Microsoft Corporation. All rights reserved.
  4021. call :FOOTER
  4022. IF EXIST "%SystemRoot%\system32\SppExtComObjPatcher.exe" goto :uninst
  4023. :inst
  4024. echo SppExtComObjPatcher will be installed on your computer.
  4025. call :FOOTER
  4026. :run1
  4027. call :StopService sppsvc
  4028. if not "%OsppHook%"=="0" call :StopService osppsvc
  4029. IF ERRORLEVEL 1 echo status: Error
  4030. echo.
  4031. echo Copying Files...
  4032. copy /y "files\SppExtComObjPatcher\%vera%\SppExtComObjPatcher.exe" "%SystemRoot%\system32" >nul
  4033. echo status: OK
  4034. IF ERRORLEVEL 1 echo status: Error
  4035. copy /y "files\SppExtComObjPatcher\%vera%\SppExtComObjHook.dll" "%SystemRoot%\system32" >nul
  4036. echo status: OK
  4037. IF ERRORLEVEL 1 echo status: Error
  4038. echo Creating Registry Entries...
  4039. if %OSType% EQU Win8 (
  4040. echo Creating Registry Entry for SppExtComObj.exe of Windows 8/8.1
  4041. call :CreateIFEOEntry "SppExtComObj.exe"
  4042. )
  4043. if %OSType% EQU Win7 (
  4044. echo Creating Registry Entry for sppsvc.exe of Windows 7
  4045. call :CreateIFEOEntry "sppsvc.exe"
  4046. )
  4047. if not "%OsppHook%"=="0" (
  4048. echo Creating Registry Entry for osppsvc.exe of Office 2010/2013
  4049. call :CreateIFEOEntry "osppsvc.exe"
  4050. )
  4051. goto :end
  4052. :uninst
  4053. echo SppExtComObjPatcher will be removed from your computer.
  4054. call :FOOTER
  4055. :run2
  4056. call :StopService2 sppsvc
  4057. if not "%OsppHook%"=="0" call :StopService2 osppsvc
  4058. echo Removing Installed Files...
  4059. if exist "%SystemRoot%\system32\SppExtComObjPatcher.exe" (
  4060. echo SppExtComObjPatcher.exe Found. Removing...
  4061. del /f /q "%SystemRoot%\system32\SppExtComObjPatcher.exe"
  4062. )
  4063. if exist "%SystemRoot%\system32\SppExtComObjHook.dll" (
  4064. echo SppExtComObjHook.dll Found. Removing...
  4065. del /f /q "%SystemRoot%\system32\SppExtComObjHook.dll"
  4066. )
  4067. echo Removing Registry Entries...
  4068. if %OSType% EQU Win8 (
  4069. echo Removing Registry Entry for SppExtComObj.exe of Windows 8/8.1
  4070. call :RemoveIFEOEntry "SppExtComObj.exe"
  4071. )
  4072. if %OSType% EQU Win7 (
  4073. echo Removing Registry Entry for sppsvc.exe of Windows 7
  4074. call :RemoveIFEOEntry "sppsvc.exe"
  4075. )
  4076. if not "%OsppHook%"=="0" (
  4077. echo Removing Registry Entry for osppsvc.exe of Office 2010/2013
  4078. call :RemoveIFEOEntry "osppsvc.exe"
  4079. )
  4080. schtasks /delete /f /tn "\Microsoft\Windows\SoftwareProtectionPlatform\SvcTrigger" >nul 2>&1
  4081. goto :end
  4082. :CreateIFEOEntry
  4083. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Debugger" /t REG_SZ /d "SppExtComObjPatcher.exe" >nul 2>&1
  4084. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_Emulation" /t REG_DWORD /d %KMS_Emulation% >nul 2>&1
  4085. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_ActivationInterval" /t REG_DWORD /d %KMS_ActivationInterval% >nul 2>&1
  4086. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_RenewalInterval" /t REG_DWORD /d %KMS_RenewalInterval% >nul 2>&1
  4087. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2013" /t REG_SZ /d "%Office2013%" >nul 2>&1
  4088. if %~1 NEQ osppsvc.exe (
  4089. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Windows" /t REG_SZ /d "%Windows%" >nul 2>&1
  4090. )
  4091. if %~1 EQU osppsvc.exe (
  4092. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2010" /t REG_SZ /d "%Office2010%" >nul 2>&1
  4093. )
  4094. goto:eof
  4095. :RemoveIFEOEntry
  4096. if %~1 NEQ osppsvc.exe (
  4097. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f >nul 2>&1
  4098. )
  4099. if %~1 EQU osppsvc.exe (
  4100. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Debugger" >nul 2>&1
  4101. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_Emulation" >nul 2>&1
  4102. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_ActivationInterval" >nul 2>&1
  4103. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "KMS_RenewalInterval" >nul 2>&1
  4104. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2010" >nul 2>&1
  4105. reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%~1" /f /v "Office2013" >nul 2>&1
  4106. )
  4107. goto:eof
  4108. :StopService
  4109. sc query %~1 | find /i "STOPPED" >nul 2>&1
  4110. if not "%ERRORLEVEL%"=="0" net stop %~1 /y >nul 2>&1
  4111. sc query %~1 | find /i "STOPPED" >nul 2>&1
  4112. if not "%ERRORLEVEL%"=="0" sc stop %~1 >nul 2>&1
  4113. goto:eof
  4114. :StopService2
  4115. sc query %~1 | find /i "RUNNING" >nul 2>&1
  4116. if "%ERRORLEVEL%"=="0" net stop %~1 /y >nul 2>&1
  4117. sc query %~1 | find /i "RUNNING" >nul 2>&1
  4118. if "%ERRORLEVEL%"=="0" sc stop %~1 >nul 2>&1
  4119. goto:eof
  4120. :UnsupportedVersion
  4121. echo ==== ERROR ====
  4122. echo Unsupported OS version Detected.
  4123. echo This project is only supported for Windows 7/8/8.1
  4124. call :FOOTER
  4125. timeout /t 5
  4126. goto:eof
  4127. :end
  4128. echo.
  4129. echo Done.
  4130. call :FOOTER
  4131. timeout /t 5
  4132. goto:eof
  4133. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4134. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4135. :CodyInstallAuto
  4136. cls
  4137. call :HEADER "This option installs the KMS Server Service by CODYQX4", " "
  4138. if %win% lss 9200 set host=127.0.0.2
  4139. set sai=43200
  4140. set sri=43200
  4141. set start=demand
  4142. set hwid=364F463A8863D35F
  4143. set kpop=1
  4144. set name=KMSServer
  4145. set kpop=1
  4146. set loglevel=1
  4147. call :FOOTER
  4148. call :RegCody
  4149. call :RegOffice
  4150. set pid=Random
  4151. call :Initiate
  4152. sc create %name% binPath= "%windir%\%name%\%name%.exe" type= own error= normal obj= "NT AUTHORITY\NetworkService" start= demand DisplayName= %name%
  4153. call :FOOTER
  4154. net start %name% >nul
  4155. if %errorlevel% equ 0 echo Successfully started %name%.
  4156. if %errorlevel% neq 0 echo Starting %name% Failed.
  4157. call :FOOTER
  4158. timeout /t 5
  4159. goto:eof
  4160. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4161. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4162. :CodyUnInstallAuto
  4163. set "hSpp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform"
  4164. set "hOspp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform"
  4165. set "hService=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\KMS"
  4166. set "hService2=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\%name%"
  4167. if /i "%name%"=="" set name=KMSServer
  4168. if /i "%port%"=="" set "port=1688"
  4169. cls
  4170. call :HEADER "This option uninstalls KMS Server Service", " "
  4171. sc query %name% >nul
  4172. if errorlevel 1 goto :NotInstalledA
  4173. net stop %name% >nul
  4174. if %errorlevel% equ 0 echo Successfully stopped %name%.
  4175. if %errorlevel% neq 0 echo Stopping %name% Failed.
  4176. sc delete %name%
  4177. reg delete %hService% /f >nul 2>&1
  4178. reg delete %hService2% /f >nul 2>&1
  4179. call :FOOTER
  4180. call :UnRegOffice
  4181. SchTasks /Delete /TN "Reactivate Service MINUTE" /F >nul 2>&1
  4182. SchTasks /Delete /TN "Reactivate Service HOURLY" /F >nul 2>&1
  4183. SchTasks /Delete /TN "Reactivate Service DAILY" /F >nul 2>&1
  4184. SchTasks /Delete /TN "Reactivate Service WEEKLY" /F >nul 2>&1
  4185. SchTasks /Delete /TN "Reactivate Service MONTHLY" /F >nul 2>&1
  4186. SchTasks /Delete /TN "Reactivate Service ONSTART" /F >nul 2>&1
  4187. SchTasks /Delete /TN "Reactivate Service ONLOGON" /F >nul 2>&1
  4188. SchTasks /Delete /TN "Reactivate Instant MINUTE" /F >nul 2>&1
  4189. SchTasks /Delete /TN "Reactivate Instant HOURLY" /F >nul 2>&1
  4190. SchTasks /Delete /TN "Reactivate Instant DAILY" /F >nul 2>&1
  4191. SchTasks /Delete /TN "Reactivate Instant WEEKLY" /F >nul 2>&1
  4192. SchTasks /Delete /TN "Reactivate Instant MONTHLY" /F >nul 2>&1
  4193. SchTasks /Delete /TN "Reactivate Instant ONSTART" /F >nul 2>&1
  4194. SchTasks /Delete /TN "Reactivate Instant ONLOGON" /F >nul 2>&1
  4195. netsh advfirewall firewall delete rule name="%name% %port%"
  4196. if exist "%windir%\%name%" rd /s /q "%windir%\%name%" >nul
  4197. call :FOOTER
  4198. timeout /t 5
  4199. goto:eof
  4200. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4201. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4202. :NotInstalledA
  4203. echo:
  4204. echo ...Service is not installed.
  4205. echo:
  4206. echo:
  4207. timeout /t 5
  4208. goto:eof
  4209. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4210. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4211. :CodyEmuAutoInstall
  4212. pushd %~dp0
  4213. set sai=120
  4214. set sri=10080
  4215. set start=demand
  4216. set hwid=364F463A8863D35F
  4217. set kpop=1
  4218. set name=KMSServer
  4219. set kpop=1
  4220. set loglevel=1
  4221. if exist "%windir%\KMSServer\KMSServer.exe" del /s /q "%windir%\KMSServer\KMSServer.exe" >nul
  4222. xcopy "files\KMS Server %vera%.exe" "%windir%\KMSServer\" /Q /Y >nul
  4223. ren "%windir%\KMSServer\KMS Server %vera%.exe" "KMSServer.exe"
  4224. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=any
  4225. netsh advfirewall firewall add rule name="KMS Server Emulator" dir=in program="%windir%\KMSServer\KMSServer.exe" localport=%port% protocol=TCP action=allow remoteip=localsubnet
  4226. call:RegOffice
  4227. call:RegCODY
  4228. start /min cmd /c "%windir%\KMSServer\KMSServer.exe"
  4229. goto:eof
  4230. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4231. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4232. :CodyEmuAutoUninstall
  4233. set "port=1688"
  4234. set pid=RandomKMSPID
  4235. set sai=120
  4236. set sri=10080
  4237. netsh advfirewall firewall delete rule name="KMS Server Emulator"
  4238. call:UnRegOffice
  4239. call:UnRegCODY
  4240. if exist "%windir%\KMSServer\" rd /s /q "%windir%\KMSServer\" >nul
  4241. goto:eof
  4242. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4243. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4244. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4245. :KeyCheck
  4246. cls
  4247. call :HEADER "This option sets the Client Key", "FOR %ver% %vera%"
  4248. echo:
  4249. if "%ver%"=="Windows Vista (TM) Business" (set key=YFKBB-PQJJV-G996G-VWGXY-2V3X8)
  4250. if "%ver%"=="Windows 7 Professional" (set key=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4)
  4251. if "%ver%"=="Windows 7 Professional N" (set key=MRPKT-YTG23-K7D7T-X2JMM-QY7MG)
  4252. if "%ver%"=="Windows 7 Professional E" (set key=W82YF-2Q76Y-63HXB-FGJG9-GF7QX)
  4253. if "%ver%"=="Windows 7 Enterprise" (set key=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH)
  4254. if "%ver%"=="Windows 7 Enterprise N" (set key=YDRBP-3D83W-TY26F-D46B2-XCKRJ)
  4255. if "%ver%"=="Windows 7 Enterprise E" (set key=C29WB-22CC8-VJ326-GHFJW-H9DH4)
  4256. if "%ver%"=="Windows Embedded Standard" (set key=F94KQ-WJBTW-YR6MK-K7TGX-69F4C)
  4257. if "%ver%"=="Windows Web Server 2008 R2" (set key=6TPJF-RBVHG-WBW2R-86QPH-6RTM4)
  4258. if "%ver%"=="Windows Server 2008 R2 HPC" (set key=6TPJF-TT8MH-CG224-D3D7Q-498W2-9QCTX)
  4259. if "%ver%"=="Windows Server 2008 R2 Standard" (set key=NG4HW-YC6KT-GKW9T-YTKYR-T4X34-R7VHC)
  4260. if "%ver%"=="Windows Server 2008 R2 Enterprise" (set key=489J6-VHDMP-X63PK-3K798-CPX3Y)
  4261. if "%ver%"=="Windows Server 2008 R2 Datacenter" (set key=74YFP-3QFB3-KQT8W-PMXWJ-7M648)
  4262. if "%ver%"=="Windows Server 2008 R2 for Itanium-based" (set key=GT63C-RJFQ3-4GMB6-BRFB9-CB83V)
  4263. if "%ver%"=="Windows 8" (set key=BN3D2-R7TKB-3YPBD-8DRP2-27GG4)
  4264. if "%ver%"=="Windows 8 N" (set key=8N2M2-HWPGY-7PGT9-HGDD8-GVGGY)
  4265. if "%ver%"=="Windows 8 Pro" (set key=NG4HW-VH26C-733KW-K6F98-J8CK4)
  4266. if "%ver%"=="Windows 8 Pro with Media Center" (set key=GNBB8-YVD74-QJHX6-27H4K-8QHDG)
  4267. if "%ver%"=="Windows 8 Pro N" (set key=XCVCF-2NXM9-723PB-MHCB7-2RYQQ)
  4268. if "%ver%"=="Windows 8 Enterprise" (set key=32JNW-9KQ84-P47T8-D8GGY-CWCK7)
  4269. if "%ver%"=="Windows 8 Enterprise N" (set key=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT)
  4270. if "%ver%"=="Windows Server 2012 Standard" (set key=XC9B7-NBPP2-83J2H-RHMBY-92BT4)
  4271. if "%ver%"=="Windows Server 2012 Standard Core" (set key=XC9B7-NBPP2-83J2H-RHMBY-92BT4)
  4272. if "%ver%"=="Windows Server 2012 Datacenter" (set key=48HP8-DN98B-MYWDG-T2DCC-8W83P)
  4273. if "%ver%"=="Windows Server 2012 Datacenter Core" (set key=48HP8-DN98B-MYWDG-T2DCC-8W83P)
  4274. if "%ver%"=="Windows 8.1" (set key=M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK)
  4275. if "%ver%"=="Windows 8.1 Single Language" (set key=BB6NG-PQ82V-VRDPW-8XVD2-V8P66)
  4276. if "%ver%"=="Windows 8.1 Country Specific" (set key=NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3)
  4277. if "%ver%"=="Windows 8.1 with Bing" (set key=RJQCD-NFWFV-GT876-2T9JY-8FF29)
  4278. if "%ver%"=="Windows 8.1 with Bing N" (set key=Q6HTR-N24GM-PMJFP-69CD8-2GXKR)
  4279. if "%ver%"=="Windows 8.1 with Bing Single Language" (set key=KF37N-VDV38-GRRTV-XH8X6-6F3BB)
  4280. if "%ver%"=="Windows 8.1 with Bing Country Specific" (set key=R962J-37N87-9VVK2-WJ74P-XTMHR)
  4281. if "%ver%"=="Windows 8.1 N" (set key=7B9N3-D94CG-YTVHR-QBPX3-RJP64)
  4282. if "%ver%"=="Windows 8.1 Pro" (set key=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9)
  4283. if "%ver%"=="Windows 8.1 Pro Student" (set key=NQHYK-WGWJH-DQJT7-XB68G-BPYG9)
  4284. if "%ver%"=="Windows 8.1 Pro N" (set key=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY)
  4285. if "%ver%"=="Windows 8.1 Pro Student N" (set key=TNFGH-2R6PB-8XM3K-QYHX2-J4296)
  4286. if "%ver%"=="Windows 8.1 Pro with Media Center" (set key=789NJ-TQK6T-6XTH8-J39CJ-J8D3P)
  4287. if "%ver%"=="Windows 8.1 Enterprise" (set key=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7)
  4288. if "%ver%"=="Windows 8.1 Enterprise N" (set key=TT4HM-HN7YT-62K67-RGRQJ-JFFXW)
  4289. if "%ver%"=="Windows 8.1 Embedded Industry" (set key=NMMPB-38DD4-R2823-62W8D-VXKJB)
  4290. if "%ver%"=="Windows 8.1 Embedded Industry Enterprise" (set key=FNFKF-PWTVT-9RC8H-32HB2-JB34X)
  4291. if "%ver%"=="Windows 8.1 Embedded Industry Automotive" (set key=VHXM3-NR6FT-RY6RT-CK882-KW2CJ)
  4292. if "%ver%"=="Windows Server 2012 R2 Essentials" (set key=KNC87-3J2TX-XB4WP-VCPJV-M4FWM)
  4293. if "%ver%"=="Windows Server 2012 R2 Datacenter" (set key=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9)
  4294. if "%ver%"=="Windows Server 2012 R2 Datacenter Core" (set key=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9)
  4295. if "%ver%"=="Windows Server 2012 R2 Standard" (set key=D2N9P-3P6X9-2R39C-7RTCD-MDVJX)
  4296. if "%ver%"=="Windows Server 2012 R2 Standard Core" (set key=D2N9P-3P6X9-2R39C-7RTCD-MDVJX)
  4297. if "%ver%"=="Windows Server 2012 R2 Cloud Storage" (set key=3NPTF-33KPT-GGBPR-YX76B-39KDD)
  4298. if "%ver%"=="Windows 10 Home" (set key=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99)
  4299. if "%ver%"=="Windows 10 Home N" (set key=3KHY7-WNT83-DGQKR-F7HPR-844BM)
  4300. if "%ver%"=="Windows 10 Home Single Language" (set key=7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH)
  4301. if "%ver%"=="Windows 10 Home Country Connected" (set key=PVMJN-6DFY6-9CCP6-7BKTT-D3WVR)
  4302. if "%ver%"=="Windows 10 Pro" (set key=W269N-WFGWX-YVC9B-4J6C9-T83GX)
  4303. if "%ver%"=="Windows 10 Pro N" (set key=MH37W-N47XK-V7XM9-C7227-GCQG9)
  4304. if "%ver%"=="Windows 10 Education" (set key=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2)
  4305. if "%ver%"=="Windows 10 Education N" (set key=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ)
  4306. if "%ver%"=="Windows 10 Enterprise" (set key=NPPR9-FWDCX-D2C8J-H872K-2YT43)
  4307. if "%ver%"=="Windows 10 Enterprise N" (set key=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4)
  4308. if "%ver%"=="Windows 10 Enterprise 2015 LTSB" (set key=WNMTR-4C88C-JK8YV-HQ7T2-76DF9)
  4309. if "%ver%"=="Windows 10 Enterprise 2015 LTSB N" (set key=2F77B-TNFGY-69QQF-B8YKP-D69TJ)
  4310. goto:eof
  4311. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4312. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4313. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4314. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4315. :CheckToolStart
  4316. set slp=SoftwareLicensingProduct
  4317. set sls=SoftwareLicensingService
  4318. set spp=SoftwareProtectionProduct
  4319. set sps=SoftwareProtectionService
  4320. set ospp=OfficeSoftwareProtectionProduct
  4321. for /f "tokens=2 delims==" %%A IN ('"wmic path %sls% get version /format:list"') do set version=%%A
  4322. FOR /F "tokens=3* delims= " %%I IN ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" ^| findstr ProductName') DO SET ver=%%I %%J
  4323. for /f "tokens=2* delims= " %%a in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v "PROCESSOR_ARCHITECTURE"') do if "%%b"=="AMD64" (set vera=x64) else (set vera=x86)
  4324. for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G
  4325. for /f "tokens=2,3 delims=.=" %%A IN ('"wmic path %sls% get version /format:list"') do set build=%%A.%%B
  4326. FOR /F "tokens=3,4 delims=. " %%I IN ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" ^| findstr BuildLabEx') DO (SET build1=%%I.%%J)
  4327. FOR /F "tokens=3* delims= " %%I IN ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" ^| findstr EditionID') DO (SET edition=%%I)
  4328. for /d %%a in (Ultimate, UltimateN, UltimateE, HomeBasic, HomeBasicN, HomeBasicE, HomePremium, HomePremiumN, HomePremiumE) do if "%edition%"=="%%a" set "comment=^< NOT SUPPORTED ^>"
  4329. goto:eof
  4330. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4331. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4332. :ID
  4333. set slp=SoftwareLicensingProduct
  4334. for /f "tokens=2 delims==" %%G in ('"wmic path %slp% where (Name like '%%Windows%%' and LicenseStatus='%status%') get ID /format:list"') do set id=%%G
  4335. goto:eof
  4336. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4337. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4338. :OID
  4339. set ospp=OfficeSoftwareProtectionProduct
  4340. set osps=OfficeSoftwareProtectionService
  4341. set slp=SoftwareLicensingProduct
  4342. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name LIKE '%%%~2%%') get LicenseStatus /format:list"') do if %%A geq 1 set officestatus=%%A
  4343. for /f "tokens=2 delims==" %%G in ('"wmic path %~1 where (Name like '%%%~2%%' and LicenseStatus='%officestatus%') get ID /format:list"') do set oid=%%G
  4344. goto:eof
  4345. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4346. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4347. :POID
  4348. set ospp=OfficeSoftwareProtectionProduct
  4349. set osps=OfficeSoftwareProtectionService
  4350. set slp=SoftwareLicensingProduct
  4351. for /f "tokens=2 delims==" %%A in ('"wmic path %~1 where (Name like '%%%~2%%') get LicenseStatus /format:list"') do if %%A geq 1 set othersstatus=%%A
  4352. for /f "tokens=2 delims==" %%G in ('"wmic path %~1 where (Name like '%%%~2%%' and LicenseStatus='%othersstatus%') get ID /format:list"') do set poid=%%G
  4353. goto:eof
  4354. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4355. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4356. :CheckSPPSVC
  4357. set slp=SoftwareLicensingProduct
  4358. if %win% GEQ 9200 for /f %%A in ('cscript files\PID8.vbs') do set productkey=%%A
  4359. if %win% LSS 9200 for /f %%A in ('cscript files\PID7.vbs') do set productkey=%%A
  4360. for /f "tokens=2 delims== " %%A in ('"wmic path %slp% where (Name LIKE '%%Windows%%') get GracePeriodRemaining /format:list"') do (set grace=%%A)&&(if %%A geq 1 goto:Status)
  4361. :Status
  4362. for /f "usebackq tokens=2 delims==" %%n in (`"%SystemRoot%\System32\wbem\WMIC.exe" /namespace:\\root\cimv2 path %sls% get RemainingWindowsReArmCount /format:list`) do set r=%%n
  4363. for /f "tokens=2 delims== " %%A in ('"wmic path %slp% where (Name LIKE '%%Windows%%') get LicenseStatus /format:list"') do (set status=%%A)&&(if !status! geq 1 goto:License)
  4364. :License
  4365. set /a grace=grace/60/24
  4366. if %status% EQU 6 set "license=^< EXTENDED GRACE Left: %grace% days ^>" & color 1F
  4367. if %status% EQU 5 set "license=^< NOTIFICATION ^>" & color 4F
  4368. if %status% EQU 4 set "license=^< NON GENUINE GRACE Left: %grace% days ^>" & color 1F
  4369. if %status% EQU 3 set "license=^< OOT GRACE Left: %grace% days ^>" & color 1F
  4370. if %status% EQU 2 set "license=^< OOB GRACE Left: %grace% days ^>" & color 1F
  4371. if %status% EQU 1 set "license=^< LICENSED ^>"
  4372. if %status% EQU 0 set "license=^< UNLICENSED ^>"& color 1F
  4373. if %win% GEQ 9200 ( set "tok=6" ) else ( set "tok=9" )
  4374. for /f "tokens=%tok% delims==,() " %%G in ('"wmic path %slp% where LicenseStatus='%status%' get Description /format:list"') do set channel=%%G
  4375. goto:eof
  4376. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4377. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4378. :Layout
  4379. set "permanent="
  4380. set "left="
  4381. for /d %%a in (RETAIL, OEM, OEM_SLP, OEM_NONSLP, OEM_COA, OEM_DM, VOLUME_MAK, VOLUME_KMS) do if "%channel%"=="%%a" if "%status%"=="1" set "permanent=PERMANENTLY "
  4382. if "%channel%"=="VOLUME_KMSCLIENT" set "left=(Left: %grace% days)"
  4383. for /d %%a in (2, 3, 4, 6) do if "%channel%"=="VOLUME_KMSCLIENT" if %status% EQU %%a set "left="
  4384. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  4385. echo Û -==Emulators: CODYQX4, mikmik38, deagles, SirWest, Hotbird64, qad ^& CyNecx==- Û
  4386. echo Û --==Code: s1ave77, ColdZero, ms-7, MasterDisaster==-- Û
  4387. echo Û --==forums.mydigitallife.info==-- Û
  4388. echo ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
  4389. echo:
  4390. echo User...: %username% ^| at: %computername%
  4391. echo Version: %ver% %comment%
  4392. echo Edition: %build%.%build1% %edition%
  4393. echo Channel: %channel% ^| Arch: %vera%
  4394. echo Act.ID.: %id%
  4395. echo: PID....: %productkey%
  4396. echo Status.: %status% = %permanent%%license% %left%
  4397. echo:
  4398. goto:eof
  4399. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4400. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4401. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4402. :NotInstalled
  4403. echo:
  4404. echo ...Service is not installed.
  4405. call :FOOTER
  4406. timeout /t 5
  4407. goto:eof
  4408. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4409. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4410. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4411. :NotSupported
  4412. cls
  4413. call :HEADER "Not supported: %ver% %vera% found!", " "
  4414. echo:
  4415. echo Operating System is not supported.
  4416. call :FOOTER
  4417. timeout /t 5
  4418. goto:eof
  4419. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4420. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4421. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4422. :HEADER
  4423. echo:
  4424. echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
  4425. echo %~1
  4426. echo:%~2
  4427. echo ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
  4428. echo:
  4429. goto:eof
  4430. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4431. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4432. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4433. :FOOTER
  4434. echo:
  4435. echo ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
  4436. echo:
  4437. goto:eof
  4438. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4439. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4440. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4441. :SHORTFOOTER
  4442. echo:
  4443. echo ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
  4444. echo:
  4445. goto:eof
  4446. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4447. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4448. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4449. :TITLE
  4450. title s1ave77s ₫ S-M-R-T JATDevice ₫ vXXVI
  4451. goto:eof
  4452. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4453. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4454. ::++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4455. :Exit
  4456. endlocal
  4457. exit
  4458. goto:eof
  4459. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4460. :++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement