Ini adalah source code untuk activator Microsoft Office 2010 yang didapati dari http://r00tsecurity.org/db/code/172



  1. @echo off
  2. @color 0C
  3. title IORRT 3.0
  4. REM Variables
  5. set InstallRoot=
  6. set OfficeArchType=
  7. REM Check Office Architecture Type
  8. if '%processor_architecture%'=='x86' Set OfficeArchType=32 && Goto:EndArchCheck
  9. goto:WOWCheck
  10. :WOWCheck
  11. 2>nul REG QUERY HKLM\SOFTWARE\Microsoft\Office\14.0\Common | find /i "InstallRoot" 1>nul
  12. IF ERRORLEVEL 1 Set OfficeArchType=WOW && Goto:EndArchCheck
  13. Set OfficeArchType=64
  14. :EndArchCheck
  15. REM Get Office Installed Path
  16. if %OfficeArchType%==WOW (
  17. FOR /F "tokens=2* delims=     " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot​" /v Path') DO SET InstallRoot=%%B
  18. Goto:FoundPath
  19. )
  20. FOR /F "tokens=2* delims=     " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B
  21. :FoundPath
  22. REM Start OSPPSVC (To make sure it is started to prevent strange cases where it doesn't start automatically from failing (XP))
  23. 1>nul 2>nul net start osppsvc
  24. :MAINMENU
  25. mode con: cols=45 lines=10
  26. CLS
  27. echo.
  28. echo.
  29. echo.
  30. echo. InfiniteOfficeRestoreRearmTask (IORRT)
  31. echo.
  32. echo. A. Install
  33. echo. B. Uninstall
  34. echo. C. Restore/Rearm
  35. echo. D. Status
  36. echo. E. Exit
  37. echo.
  38. :CHOOSEACTION
  39. set /p userinp= ^ Make your selection:
  40. set userinp=%userinp:~0,1%
  41. if /i "%userinp%"=="A" goto Install
  42. if /i "%userinp%"=="B" goto Uninstall
  43. if /i "%userinp%"=="C" goto Restore/Rearm
  44. if /i "%userinp%"=="D" goto Status
  45. if /i "%userinp%"=="E" goto Exit
  46. echo.Try Again...
  47. GOTO CHOOSEACTION
  48. :Install
  49. CLS
  50. mode con: cols=64 lines=21
  51. title IORRT 3.0
  52. schtasks /query | FINDSTR /I "IORRT" >NUL
  53. IF ERRORLEVEL 1 (
  54. echo Checking rearm status...
  55. echo.
  56. ) ELSE (
  57. echo IORRT has already been installed...
  58. echo.
  59. echo Press any key to return to the main menu
  60. PAUSE 1>nul
  61. GOTO MAINMENU
  62. )
  63. mkdir "%SystemDrive%\Check"
  64. net stop osppsvc
  65. xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\Check\Backup\Files\Tokens"
  66. mkdir "%SystemDrive%\Check\Backup\Registry"
  67. reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv
  68. net start osppsvc
  69. IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" (
  70. "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
  71. ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
  72. )
  73. if errorlevel==0 goto Pass
  74. net stop osppsvc
  75. xcopy /cheriky "%SystemDrive%\Check\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
  76. REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  77. REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  78. reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv
  79. net start osppsvc
  80. DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
  81. SET file=%SystemDrive%\Check
  82. IF EXIST %file% attrib -h %file%
  83. RD /S /Q %file%
  84. echo.
  85. echo.No rearms detected...
  86. echo.
  87. echo.Press any key to return to the main menu
  88. pause > nul
  89. GOTO MAINMENU
  90. )
  91. :Pass
  92. net stop osppsvc
  93. xcopy /cheriky "%SystemDrive%\Check\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
  94. REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  95. REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  96. reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv
  97. net start osppsvc
  98. DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
  99. SET file=%SystemDrive%\Check
  100. IF EXIST %file% attrib -h %file%
  101. RD /S /Q %file%
  102. echo.
  103. echo Installing IORRT...
  104. echo.
  105. mkdir "%SystemDrive%\IORRT"
  106. net stop osppsvc
  107. xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\IORRT\Backup\Files\Tokens"
  108. mkdir "%SystemDrive%\IORRT\Backup\Registry"
  109. reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
  110. net start osppsvc
  111. SET file=%SystemDrive%\IORRT\IORRT.bat
  112. IF EXIST %file% attrib -h %file%
  113. echo @echo off >%file%
  114. echo net stop osppsvc >>%file%
  115. echo xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file%
  116. echo REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
  117. echo REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
  118. echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv >>%file%
  119. echo net start osppsvc >>%file%
  120. echo IF Exist "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( >>%file%
  121. echo "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file%
  122. echo ) ELSE ( "%COMMONPROGRAMFILES(X86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file%
  123. echo ) >>%file%
  124. echo schtasks /delete /tn "IORRT" /f >>%file%
  125. echo schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
  126. IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" (
  127. "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
  128. ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
  129. )
  130. schtasks /create /tn "Hybrid" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc onstart /ru ""
  131. schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru ""
  132. echo.
  133. cd /d "%InstallRoot%"
  134. cscript OSPP.VBS /dstatus
  135. schtasks /query | FINDSTR /I "IORRT"
  136. echo.Press any key to return to the main menu
  137. pause > nul
  138. GOTO MAINMENU
  139. )
  140. :Uninstall
  141. mode con: cols=64 lines=21
  142. title IORRT 3.0
  143. schtasks /query | FINDSTR /I "IORRT" >NUL
  144. IF '%ERRORLEVEL%' EQU '0' (
  145. echo Uninstalling IORRT...
  146. echo.
  147. ) ELSE (
  148. echo IORRT is already uninstalled...
  149. echo.
  150. echo Press any key to return to the main menu
  151. PAUSE 1>nul
  152. GOTO MAINMENU
  153. )
  154. net stop osppsvc
  155. xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
  156. REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  157. REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  158. reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
  159. net start osppsvc
  160. DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
  161. SET file=%SystemDrive%\IORRT
  162. IF EXIST %file% attrib -h %file%
  163. RD /S /Q %file%
  164. schtasks /delete /tn "Hybrid" /f
  165. schtasks /delete /tn "IORRT" /f
  166. cd /d "%InstallRoot%"
  167. cscript OSPP.VBS /dstatus
  168. schtasks /query | FINDSTR /I "IORRT"
  169. echo.
  170. echo.Press any key to return to the main menu
  171. pause > nul
  172. GOTO MAINMENU
  173. )
  174. :Restore/Rearm
  175. mode con: cols=64 lines=21
  176. title IORRT 3.0
  177. schtasks /query | FINDSTR /I "IORRT" >NUL
  178. IF '%ERRORLEVEL%' EQU '0' (
  179. echo Restoring/Rearming...
  180. echo.
  181. ) ELSE (
  182. echo Install IORRT before you Restore/Rearm...
  183. echo.
  184. echo Press any key to return to the main menu
  185. PAUSE 1>nul
  186. GOTO MAINMENU
  187. )
  188. net stop osppsvc
  189. xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
  190. REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  191. REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
  192. reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
  193. net start osppsvc
  194. IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" (
  195. "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
  196. ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
  197. )
  198. schtasks /delete /tn "IORRT" /f
  199. schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru ""
  200. cd /d "%InstallRoot%"
  201. cscript OSPP.VBS /dstatus
  202. schtasks /query | FINDSTR /I "IORRT"
  203. echo.Press any key to return to the main menu
  204. pause > nul
  205. GOTO MAINMENU
  206. )
  207. :Status
  208. mode con: cols=64 lines=21
  209. title IORRT 3.0
  210. cd /D "%InstallRoot%"
  211. cscript OSPP.VBS /dstatus
  212. schtasks /query | FINDSTR /I "IORRT"
  213. IF ERRORLEVEL 1 echo IORRT is not yet Installed
  214. echo.
  215. echo.Press any key to return to the main menu
  216. pause > nul
  217. GOTO MAINMENU
  218. )
  219. :Exit