Guest User

Untitled

a guest
Apr 24th, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. @echo off & color 1F
  2. setlocal ENABLEDELAYEDEXPANSION
  3. for /F "usebackq tokens=4 delims= " %%I in (`%SYSTEMROOT%\system32\chcp.com`) do set ACTCODEPAGE=%%I
  4. "%SYSTEMROOT%\system32\chcp.com" 437 >nul
  5.  
  6.  
  7. rem *** Internet KMS Activation Script (MAY 10, 2011) ***
  8.  
  9.  
  10. rem [Step 1]
  11. rem This step is optional and you may skip it.
  12.  
  13. cls
  14. echo Microsoft (R) Windows Software Licensing.
  15. echo Copyright (C) Microsoft Corporation. All rights reserved.
  16. echo.
  17. echo Step 1: Select your Windows(R) 7 edition.
  18. echo.
  19. echo.
  20. echo This tool can help you activate
  21. echo one of the following Microsoft(R) products:
  22. echo.
  23. echo A) Windows(R) 7 Professional
  24. echo B) Windows(R) 7 Professional N
  25. echo C) Windows(R) 7 Enterprise
  26. echo D) Windows(R) 7 Enterprise E
  27. echo E) Windows(R) 7 Enterprise N
  28. echo.
  29. echo F) {Skip this step}
  30. echo.
  31. echo.
  32.  
  33. choice /C ABCDEF /N /M "Select one of the options above (A-F):"
  34. if ERRORLEVEL 6 goto :step2
  35. if ERRORLEVEL 5 set PRODUCTKEY=YDRBP-3D83W-TY26F-D46B2-XCKRJ
  36. if ERRORLEVEL 4 set PRODUCTKEY=C29WB-22CC8-VJ326-GHFJW-H9DH4
  37. if ERRORLEVEL 3 set PRODUCTKEY=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
  38. if ERRORLEVEL 2 set PRODUCTKEY=MRPKT-YTG23-K7D7T-X2JMM-QY7MG
  39. if ERRORLEVEL 1 set PRODUCTKEY=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
  40.  
  41. echo.
  42. echo.
  43. "%SYSTEMROOT%\system32\cscript.exe" "%SYSTEMROOT%\system32\slmgr.vbs" -ipk %PRODUCTKEY%
  44. pause
  45.  
  46.  
  47. :step2
  48. rem [Step 2]
  49. rem All servers are tested/alive.
  50. rem If you have problems and want to re-check any of them
  51. rem don't just ping it, use telnet tool instead:
  52. rem telnet <KMS host IP-address or DNS name> <port>
  53. rem or a port scanner like Microsoft(R) PortQry:
  54. rem http://www.microsoft.com/downloads/details.aspx?familyid=89811747-C74B-4638-A2D5-AC828BDC6983
  55.  
  56. cls
  57. echo Microsoft (R) Windows Software Licensing.
  58. echo Copyright (C) Microsoft Corporation. All rights reserved.
  59. echo.
  60. echo Step 2: Select Key Management Service (KMS) host.
  61. echo.
  62. echo.
  63. echo Select a server from the list below to set it as the KMS host
  64. echo for your Windows(R) operating system:
  65. echo.
  66. echo A) yuna.no-ip.info
  67. echo B) 91.149.135.121
  68. echo C) 194.0.116.18
  69. echo D) 121.18.82.147
  70. echo E) kmsr2.dynalias.com
  71. echo.
  72. echo F) {Skip this step}
  73. echo.
  74. echo.
  75.  
  76. choice /C ABCDEF /N /M "Select one of the options above (A-F):"
  77. if ERRORLEVEL 6 goto :step3
  78. if ERRORLEVEL 5 set KMSS=kmsr2.dynalias.com:1688
  79. if ERRORLEVEL 4 set KMSS=121.18.82.147:1688
  80. if ERRORLEVEL 3 set KMSS=194.0.116.18:1688
  81. if ERRORLEVEL 2 set KMSS=91.149.135.121:1688
  82. if ERRORLEVEL 1 set KMSS=yuna.no-ip.info:1688
  83.  
  84. echo.
  85. echo.
  86. "%SYSTEMROOT%\system32\cscript.exe" "%SYSTEMROOT%\system32\slmgr.vbs" -skms %KMSS%
  87. endlocal
  88. pause
  89.  
  90.  
  91. :step3
  92. rem [Step 3]
  93.  
  94. cls
  95. echo Microsoft (R) Windows Software Licensing.
  96. echo Copyright (C) Microsoft Corporation. All rights reserved.
  97. echo.
  98. echo Step 3: Activation.
  99. echo.
  100. echo.
  101.  
  102. echo Resynching time...
  103. "%SYSTEMROOT%\system32\sc.exe" start w32time >nul
  104. "%SYSTEMROOT%\system32\timeout.exe" /T 2 /NOBREAK >nul
  105. for /F "usebackq delims=" %%I in (`%SYSTEMROOT%\system32\sc.exe query w32time ^| findstr /R "STATE"`) do set W32TIMESTATE=%%I
  106. for /F "usebackq tokens=4 delims= " %%I in ('%W32TIMESTATE%') do set W32TIMESTATE=%%I
  107. if /I "%W32TIMESTATE%" NEQ "RUNNING" echo WARNING: Could not start Windows Time service!
  108. "%SYSTEMROOT%\system32\w32tm.exe" /resync
  109. echo.
  110. "%SYSTEMROOT%\system32\cscript.exe" "%SYSTEMROOT%\system32\slmgr.vbs" -ato
  111. pause
  112.  
  113.  
  114. rem [Step 4]
  115.  
  116. cls
  117. echo Microsoft (R) Windows Software Licensing.
  118. echo Copyright (C) Microsoft Corporation. All rights reserved.
  119. echo.
  120. echo Step 4: Activation Status Check.
  121. echo.
  122. echo.
  123.  
  124. "%SYSTEMROOT%\system32\cscript.exe" "%SYSTEMROOT%\system32\slmgr.vbs" -dli
  125. "%SYSTEMROOT%\system32\chcp.com" %ACTCODEPAGE% >nul
  126. echo Press any key to exit . . . & pause >nul
Advertisement
Add Comment
Please, Sign In to add comment