Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

506 lines
22 KiB

  1. @echo off
  2. SET PLATFORM=%PROCESSOR_ARCHITECTURE%
  3. if "%PLATFORM%"=="" goto Win95
  4. if "%PLATFORM%"=="WIN95" goto Win95
  5. if /i "%1"=="/?" goto usage
  6. if /i "%1"=="WOLFPACK" SET WOLFPACK=1
  7. if /i "%WOLFPACK%"=="1" SHIFT
  8. SET INETSRV=%1
  9. rem SET MTX=%2
  10. rem SET INDEX=%3
  11. SET BINPATH=\\tonygod\public\tools
  12. if /i "%INETSRV%"=="" SET INETSRV=%windir%\system32\inetsrv
  13. if /i "%INETSRV%"=="%WINDIR%" goto BadDir
  14. if /i "%INETSRV%"=="%WINDIR%\system32" goto BadDir
  15. if /i "%INETSRV%"=="C:\" goto BadDir
  16. if /i "%INETSRV%"=="D:\" goto BadDir
  17. if /i "%INETSRV%"=="E:\" goto BadDir
  18. rem if /i "%MTX%"=="" SET MTX=%SYSTEMDRIVE%\Program Files\mts
  19. rem if /i "%MTX%"=="%WINDIR%" goto BadDir
  20. rem if /i "%MTX%"=="%WINDIR%\system32" goto BadDir
  21. rem if /i "%MTX%"=="C:\" goto BadDir
  22. rem if /i "%MTX%"=="D:\" goto BadDir
  23. rem if /i "%MTX%"=="E:\" goto BadDir
  24. rem if /i "%INDEX%"=="" SET INDEX=%SYSTEMDRIVE%\inetpub\catalog.wci
  25. rem if /i "%INDEX%"=="%WINDIR%" goto BadDir
  26. rem if /i "%INDEX%"=="%WINDIR%\system32" goto BadDir
  27. rem if /i "%INDEX%"=="C:\" goto BadDir
  28. rem if /i "%INDEX%"=="D:\" goto BadDir
  29. rem if /i "%INDEX%"=="E:\" goto BadDir
  30. echo This script is intended as a supplement to the IIS 5.0 Setup Remove All
  31. echo feature. It is not intended as a replacement. You should only run
  32. echo this batch file if you already attempted a Remove All and Setup
  33. echo failed to remove all components from your system.
  34. echo.
  35. pause
  36. echo.
  37. echo *********************************************************************
  38. echo IIS Binaries Directory: %INETSRV%
  39. rem echo MTX Directory : %MTX%
  40. rem echo Index Server Directory: %INDEX%
  41. echo.
  42. echo If this is not correct, hit CTRL-C and restart this batch
  43. echo file with the following usage:
  44. echo.
  45. rem echo cleank2.bat ^<INETSRV DIR^> ^<MTX DIR^> ^<INDEX DIR^>
  46. echo cleank2.bat ^<INETSRV DIR^>
  47. echo *********************************************************************
  48. echo.
  49. pause
  50. echo.
  51. if /i "%WOLFPACK%"=="1" goto NoWolfPack
  52. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool enum hkey_local_machine\system\currentcontrolset\services\clussvc > NUL
  53. if ERRORLEVEL==1 goto NoWolfPack
  54. echo The registry key for the WolfPack Clustering Service was detected. If
  55. echo WolfPack is indeed installed on this machine, hit CTRL-C now and re-run
  56. echo this batch file as follows: cleank2.bat wolfpack
  57. echo.
  58. echo If the WolfPack Clustering service is not installed, you may continue with
  59. echo this batch file. The registry key for the WolfPack Clustering Service will
  60. echo be removed.
  61. echo.
  62. pause
  63. echo.
  64. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete hkey_local_machine\system\currentcontrolset\services\clussvc
  65. :NoWolfPack
  66. rem echo Running MtxStop.exe
  67. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\mtxstop.exe
  68. echo Killing inetinfo process
  69. %BINPATH%\%PROCESSOR_ARCHITECTURE%\kill -f inetinfo.exe
  70. echo Killing cisvc process
  71. %BINPATH%\%PROCESSOR_ARCHITECTURE%\kill -f cisvc.exe
  72. echo Killing Perfmon process
  73. REM Added by aaronl and SaurabN 8/7/98
  74. %BINPATH%\%PROCESSOR_ARCHITECTURE%\kill -f perfmon.exe
  75. echo Killing cidaemon process
  76. %BINPATH%\%PROCESSOR_ARCHITECTURE%\kill -f cidaemon.exe
  77. echo Killing mtx process
  78. %BINPATH%\%PROCESSOR_ARCHITECTURE%\kill -f mtx.exe
  79. rem echo Killing msdtc process
  80. rem kill -f msdtc.exe
  81. echo Stopping MSSqlServer service
  82. net stop MSSqlServer
  83. echo Stopping MSDTC service
  84. net stop MSDTC
  85. echo Stopping SNMP Service
  86. REM Added by aaronl and SaurabN 8/7/98
  87. net stop snmp
  88. echo Killing mmc process
  89. %BINPATH%\%PROCESSOR_ARCHITECTURE%\kill -f mmc.exe
  90. echo.
  91. echo Removing msftpsvc
  92. %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete msftpsvc
  93. echo Removing w3svc
  94. %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete w3svc
  95. echo Removing spud
  96. %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete spud
  97. echo Removing iisadmin
  98. %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete iisadmin
  99. rem echo Removing cisvc
  100. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete cisvc
  101. rem echo Removing msdtc
  102. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete msdtc
  103. echo Remove smtpsvc
  104. %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete smtpsvc
  105. echo Remove nntpsvc
  106. %BINPATH%\%PROCESSOR_ARCHITECTURE%\sc delete nntpsvc
  107. echo.
  108. echo Cleaning the registry
  109. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\InetStp
  110. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Inetsrv
  111. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\InetMgr
  112. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Keyring
  113. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\inetmgr.exe
  114. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\keyring.exe
  115. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\Oc Manager
  116. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\MSIIS
  117. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Transaction Server
  118. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\IISADMIN
  119. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Inetinfo
  120. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSFTPSVC
  121. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SPUD
  122. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC
  123. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\cisvc
  124. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ContentFilter
  125. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ContentIndex
  126. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ISAPISearch
  127. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LicenseServiceX
  128. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC
  129. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NntpSvc
  130. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSDTC
  131. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSMQ
  132. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MQAC
  133. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Transaction Server
  134. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\msmq
  135. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\AppID\{182C40F0-32E4-11D0-818B-00A0C9231C29}
  136. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\CLSID\{182C40F0-32E4-11D0-818B-00A0C9231C29}
  137. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\MTxCatEx.CatalogServer.1
  138. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\AppID\{5CB66670-D3D4-11CF-ACAB-00A024A55AEF}
  139. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\CLSID\{5CB66670-D3D4-11CF-ACAB-00A024A55AEF}
  140. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\TxCTx.TransactionContextEx
  141. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\AppID\{7999FC25-D3C6-11CF-ACAB-00A024A55AEF}
  142. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\CLSID\{7999FC25-D3C6-11CF-ACAB-00A024A55AEF}
  143. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\TxCTx.TransactionContext
  144. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\AppID\{B1CE7318-848F-11D0-8D13-00C04FC2E0C7}
  145. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\CLSID\{B1CE7318-848F-11D0-8D13-00C04FC2E0C7}
  146. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\MTS.ClientExport.1
  147. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\AppID\{CBD759F3-76AA-11CF-BE3A-00AA00A2FA25}
  148. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\CLSID\{CBD759F3-76AA-11CF-BE3A-00AA00A2FA25}
  149. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CLASSES_ROOT\MTxExTrk.MTxExecutiveTracker.1
  150. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\MMC
  151. rem %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\MCIS
  152. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Site Analyst
  153. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Webpost
  154. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\ADs\providers\iis
  155. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Cluster\ResourceTypes\IIS Server Instance
  156. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\MachineKeys\Microsoft Internet Information Server
  157. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\MachineKeys\MS IIS DCOM Server
  158. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\MachineKeys\MS IIS DCOM Client
  159. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CURRENT_USER\Software\Microsoft\Cryptography\UserKeys\Microsoft Internet Information Server
  160. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CURRENT_USER\Software\Microsoft\Cryptography\UserKeys\MS IIS DCOM Server
  161. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_CURRENT_USER\Software\Microsoft\Cryptography\UserKeys\MS IIS DCOM Client
  162. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_USERS\.Default\Software\Microsoft\Cryptography\UserKeys\Microsoft Internet Information server
  163. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_USERS\.Default\Software\Microsoft\Cryptography\UserKeys\MS IIS DCOM Server
  164. %BINPATH%\%PROCESSOR_ARCHITECTURE%\regtool delete /q /r HKEY_USERS\.Default\Software\Microsoft\Cryptography\UserKeys\MS IIS DCOM Client
  165. echo.
  166. echo Removing WAM registry keys
  167. %BINPATH%\%PROCESSOR_ARCHITECTURE%\cleanwam
  168. echo.
  169. echo Removing files and directories
  170. rd /s /q "%INETSRV%"
  171. rem rd /s /q "%MTX%"
  172. rem rd /s /q %SYSTEMDRIVE%\MTX
  173. rem rd /s /q %WINDIR%\system32\MTX
  174. rem rd /s /q %WINDIR%\system32\MTS
  175. rem rd /s /q "%INDEX%"
  176. rd /s /q "%SYSTEMDRIVE%\program files\microsoft site analyst"
  177. rd /s /q "%SYSTEMDRIVE%\program files\usage analyst"
  178. rd /s /q "%SYSTEMDRIVE%\program files\web publish"
  179. rd /s /q "%SYSTEMDRIVE%\program files\microsoft script debugger"
  180. rem rd /s /q "%SYSTEMDRIVE%\program files\mtx"
  181. rd /s /q %WINDIR%\system32\logfiles
  182. rem rd /s /q %WINDIR%\system32\setup
  183. rem md %WINDIR%\system32\setup
  184. rem del /f %WINDIR%\system32\adme.dll
  185. rem del /f %WINDIR%\system32\dac.exe
  186. rem del /f %WINDIR%\system32\dacdll.dll
  187. rem del /f %WINDIR%\system32\dtccm.dll
  188. rem del /f %WINDIR%\system32\dtctrace.dll
  189. rem del /f %WINDIR%\system32\dtctrace.exe
  190. rem del /f %WINDIR%\system32\dtcuic.dll
  191. rem del /f %WINDIR%\system32\dtcuis.dll
  192. rem del /f %WINDIR%\system32\dtcutil.dll
  193. rem del /f %WINDIR%\system32\enudtc.dll
  194. rem del /f %WINDIR%\system32\logmgr.dll
  195. rem del /f %WINDIR%\system32\msdtc.exe
  196. rem del /f %WINDIR%\system32\msdtc.dll
  197. rem del /f %WINDIR%\system32\msdtcprx.dll
  198. rem del /f %WINDIR%\system32\msdtctm.dll
  199. rem del /f %WINDIR%\system32\dtccfg.cpl
  200. rem del /f %WINDIR%\system32\svcsrvl.dll
  201. rem del /f %WINDIR%\system32\xolehlp.dll
  202. rem del /f %WINDIR%\system32\mmc.exe
  203. rem del /f %WINDIR%\system32\mmc.ini
  204. rem del /f %WINDIR%\system32\mmclv.dll
  205. rem del /f %WINDIR%\system32\mmcndmgr.dll
  206. rem del /f %WINDIR%\system32\secthunk.dll
  207. rem del /f %WINDIR%\system32\regthunk.dll
  208. rem del /f %WINDIR%\system32\miscthnk.dll
  209. rem del /f %WINDIR%\system32\mtxclu.dll
  210. rem del /f %WINDIR%\system32\mtxrn.dll
  211. rem del /f %WINDIR%\system32\mtxdm.dll
  212. rem del /f %WINDIR%\system32\mtx.exe
  213. rem del /f %WINDIR%\system32\mtxstop.exe
  214. rem del /f %WINDIR%\system32\daccom.dll
  215. rem del /f %WINDIR%\system32\mtxex.dll
  216. rem del /f %WINDIR%\system32\mtxexpd.dll
  217. rem del /f %WINDIR%\system32\mtxjava.dll
  218. rem del /f %WINDIR%\system32\jdbcdemo.dll
  219. rem del /f %WINDIR%\system32\mtxlegih.dll
  220. rem del /f %WINDIR%\system32\mtsevents.dll
  221. rem del /f %WINDIR%\system32\mtxoci.dll
  222. rem del /f %WINDIR%\system32\mtxtrk.dll
  223. rem del /f %WINDIR%\system32\mtxcatu.dll
  224. rem del /f %WINDIR%\system32\mtxrepl.exe
  225. rem del /f %WINDIR%\system32\mtxcat.dll
  226. rem del /f %WINDIR%\system32\mtxinfr1.dll
  227. rem del /f %WINDIR%\system32\mtxinfr2.dll
  228. rem del /f %WINDIR%\system32\mtxperf.dll
  229. rem del /f %WINDIR%\system32\certsrv.mdb
  230. del /f %WINDIR%\system32\admwprox.dll
  231. del /f %WINDIR%\system32\admprox.dll
  232. del /f %WINDIR%\system32\iis.dll
  233. del /f %WINDIR%\system32\iisrtl.dll
  234. del /f %WINDIR%\system32\isatq.dll
  235. REM Delete other files -- added by aaronl and SaurabN
  236. del /f %WINDIR%\system32\infoadmn.dll
  237. del /f %WINDIR%\system32\w3ctrs.dll
  238. del /f %WINDIR%\system32\ftpctrs2.dll
  239. rem del /f %WINDIR%\system32\ocmanage.dll
  240. rem del /f %WINDIR%\system32\sysocmgr.exe
  241. rem del /f %WINDIR%\system32\certmdb.mdb
  242. rem del /f %WINDIR%\system32\ciadmin.dll
  243. rem del /f %WINDIR%\system32\cidaemon.exe
  244. rem del /f %WINDIR%\system32\cisvc.exe
  245. rem del /f %WINDIR%\system32\htmlfilt.dll
  246. rem del /f %WINDIR%\system32\idq.dll
  247. rem del /f %WINDIR%\system32\ixsso.dll
  248. rem del /f %WINDIR%\system32\qperf.dll
  249. rem del /f %WINDIR%\system32\query.dll
  250. rem del /f %WINDIR%\system32\webhits.dll
  251. rem del /f %WINDIR%\system32\offfilt.dll
  252. rem del /f %WINDIR%\system32\infosoft.dll
  253. rem del /f %WINDIR%\system32\kppp.dll
  254. rem del /f %WINDIR%\system32\kppp7.dll
  255. rem del /f %WINDIR%\system32\kpw6.dll
  256. rem del /f %WINDIR%\system32\kpword.dll
  257. rem del /f %WINDIR%\system32\kpxl5.dll
  258. rem del /f %WINDIR%\system32\sccfa.dll
  259. rem del /f %WINDIR%\system32\sccfi.dll
  260. rem del /f %WINDIR%\system32\sccifilt.dll
  261. rem del /f %WINDIR%\system32\sccut.dll
  262. rem del /f %WINDIR%\system32\dtcadmc.dll
  263. rem del /f %WINDIR%\system32\dtcxatm.dll
  264. rem del /f %WINDIR%\system32\msorcl32.dll
  265. echo.
  266. echo Removing program groups
  267. rem rd /s /q "%WINDIR%\profiles\all users\start menu\programs\microsoft transaction server"
  268. rd /s /q "%WINDIR%\profiles\all users\start menu\programs\microsoft internet information server (common)"
  269. rd /s /q "%WINDIR%\profiles\all users\start menu\programs\microsoft internet information server"
  270. rd /s /q "%WINDIR%\profiles\all users\start menu\programs\microsoft personal web server (common)"
  271. rd /s /q "%WINDIR%\profiles\all users\start menu\programs\microsoft personal web server"
  272. rem rd /s /q "%WINDIR%\profiles\all users\start menu\programs\microsoft index server (common)"
  273. rem rd /s /q "%WINDIR%\profiles\all users\start menu\programs\certificate server (common)"
  274. rd /s /q "%WINDIR%\profiles\all users\start menu\programs\microsoft script debugger"
  275. rd /s /q "%WINDIR%\profiles\all users\start menu\programs\windows nt 4.0 option pack"
  276. rd /s /q "%WINDIR%\profiles\%USERNAME%\start menu\programs\microsoft posting acceptor"
  277. rd /s /q "%WINDIR%\profiles\%USERNAME%\start menu\programs\microsoft web publishing"
  278. rd /s /q "%WINDIR%\profiles\%USERNAME%\start menu\programs\microsoft site analyst"
  279. echo.
  280. echo K2 removed. You should reboot.
  281. goto end
  282. :Win95
  283. if "%1"=="/?" goto usage
  284. SET INETSRV=%1
  285. SET MTX=%2
  286. SET INDEX=%3
  287. SET BINPATH=\\tonygod\public\tools
  288. if EXIST "%WINDIR%\Start Menu\Programs\Windows Explorer.lnk" SET STARTMENU=%WINDIR%\Start Menu
  289. if EXIST "%WINDIR%\spool\Start Menu\Programs\Windows Explorer.lnk" SET STARTMENU=%WINDIR%\spool\Start menu
  290. if "%INETSRV%"=="" SET INETSRV=%WINDIR%\system\inetsrv
  291. if "%INETSRV%"=="%WINDIR%" goto BadDir
  292. if "%INETSRV%"=="%WINDIR%\system" goto BadDir
  293. if "%INETSRV%"=="C:\" goto BadDir
  294. if "%INETSRV%"=="D:\" goto BadDir
  295. if "%INETSRV%"=="E:\" goto BadDir
  296. if "%MTX%"=="" SET MTX=C:\Program Files\mts
  297. if "%MTX%"=="%WINDIR%" goto BadDir
  298. if "%MTX%"=="%WINDIR%\system" goto BadDir
  299. if "%MTX%"=="C:\" goto BadDir
  300. if "%MTX%"=="D:\" goto BadDir
  301. if "%MTX%"=="E:\" goto BadDir
  302. if "%INDEX%"=="" SET INDEX=C:\inetpub\catalog.wci
  303. if "%INDEX%"=="%WINDIR%" goto BadDir
  304. if "%INDEX%"=="%WINDIR%\system" goto BadDir
  305. if "%INDEX%"=="C:\" goto BadDir
  306. if "%INDEX%"=="D:\" goto BadDir
  307. if "%INDEX%"=="E:\" goto BadDir
  308. if "%INETSRV%"=="" goto Environment
  309. if "%MTX%"=="" goto Environment
  310. if "%INDEX%"=="" goto Environment
  311. if "%BINPATH%"=="" goto Environment
  312. if "%STARTMENU%"=="" goto Environment
  313. echo HEY! You're running Win95!
  314. echo.
  315. echo This script is intended as a supplement to the K2 Setup Remove All
  316. echo feature. It is not intended as a replacement. You should only run
  317. echo this batch file if you already attempted a Remove All and Setup
  318. echo failed to remove all components from your system.
  319. echo.
  320. pause
  321. echo.
  322. echo *********************************************************************
  323. echo IIS Binaries Directory: %INETSRV%
  324. echo MTX Directory : %MTX%
  325. echo Index Server Directory: %INDEX%
  326. echo.
  327. echo If this is not correct, hit CTRL-C and restart this batch
  328. echo file with the following usage:
  329. echo.
  330. echo cleank2.bat [INETSRV DIR] [MTX DIR] [INDEX DIR]
  331. echo *********************************************************************
  332. echo.
  333. pause
  334. echo.
  335. echo on
  336. echo Killing inetinfo process
  337. %BINPATH%\x86\kill95 -f inetinfo
  338. echo Killing cisvc process
  339. %BINPATH%\x86\kill95 -f pwstray
  340. echo off
  341. echo Cleaning the registry
  342. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\IIS4
  343. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\InetStp
  344. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\InetMgr
  345. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\W3SVC
  346. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\TransactionServer
  347. rem %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\Software\Microsoft\windows\currentversion\setup\oc manager
  348. %BINPATH%\x86\regtool delete /q /r /value:PWSTray HKEY_LOCAL_MACHINE\Software\Microsoft\windows\currentversion\Run
  349. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC
  350. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Inetinfo
  351. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\IISADMIN
  352. %BINPATH%\x86\regtool delete /q /r HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSDTC
  353. echo.
  354. echo Removing files and directories
  355. deltree /y "%INETSRV%"
  356. deltree /y "%MTX%"
  357. deltree /y "%INDEX%"
  358. deltree /y "C:\Program Files\mtx"
  359. deltree /y "D:\Program Files\mtx"
  360. deltree /y %WINDIR%\system\MTX
  361. deltree /y %WINDIR%\system\MTS
  362. deltree /y "C:\Program Files\WebSvr"
  363. deltree /y "D:\Program Files\WebSvr"
  364. deltree /y %Windir%\system\inetsrv
  365. rem deltree /y %Windir%\system\setup
  366. del %WINDIR%\system\adme.dll
  367. del %WINDIR%\system\dac.exe
  368. del %WINDIR%\system\dacdll.dll
  369. del %WINDIR%\system\dtccm.dll
  370. del %WINDIR%\system\dtctrace.dll
  371. del %WINDIR%\system\dtctrace.exe
  372. del %WINDIR%\system\dtcuic.dll
  373. del %WINDIR%\system\dtcuis.dll
  374. del %WINDIR%\system\dtcutil.dll
  375. del %WINDIR%\system\enudtc.dll
  376. del %WINDIR%\system\logmgr.dll
  377. del %WINDIR%\system\msdtc.exe
  378. del %WINDIR%\system\msdtc.dll
  379. del %WINDIR%\system\msdtcprx.dll
  380. del %WINDIR%\system\msdtctm.dll
  381. del %WINDIR%\system\dtccfg.cpl
  382. del %WINDIR%\system\svcsrvl.dll
  383. del %WINDIR%\system\xolehlp.dll
  384. rem del %WINDIR%\system\mmc.exe
  385. rem del %WINDIR%\system\mmc.ini
  386. rem del %WINDIR%\system\mmclv.dll
  387. rem del %WINDIR%\system\mmcndmgr.dll
  388. del %WINDIR%\system\secthunk.dll
  389. del %WINDIR%\system\regthunk.dll
  390. del %WINDIR%\system\miscthnk.dll
  391. del %WINDIR%\system\mtxclu.dll
  392. del %WINDIR%\system\mtxrn.dll
  393. del %WINDIR%\system\mtxdm.dll
  394. del %WINDIR%\system\mtx.exe
  395. del %WINDIR%\system\mtxstop.exe
  396. del %WINDIR%\system\daccom.dll
  397. del %WINDIR%\system\mtxex.dll
  398. del %WINDIR%\system\mtxexpd.dll
  399. del %WINDIR%\system\mtxjava.dll
  400. del %WINDIR%\system\jdbcdemo.dll
  401. del %WINDIR%\system\mtxlegih.dll
  402. del %WINDIR%\system\mtsevents.dll
  403. del %WINDIR%\system\mtxoci.dll
  404. del %WINDIR%\system\mtxtrk.dll
  405. del %WINDIR%\system\mtxcatu.dll
  406. del %WINDIR%\system\mtxrepl.exe
  407. del %WINDIR%\system\mtxcat.dll
  408. del %WINDIR%\system\mtxinfr1.dll
  409. del %WINDIR%\system\mtxinfr2.dll
  410. del %WINDIR%\system\mtxperf.dll
  411. rem del %WINDIR%\system\ocmanage.dll
  412. rem del %WINDIR%\system\sysocmgr.exe
  413. del %WINDIR%\system\dtcadmc.dll
  414. del %WINDIR%\system\dtcxatm.dll
  415. del %WINDIR%\system\msorcl32.dll
  416. echo.
  417. echo Removing program groups
  418. deltree /y "%STARTMENU%\programs\microsoft personal web server"
  419. echo.
  420. echo K2 removed.
  421. goto end
  422. :Environment
  423. echo Your DOS Enviroment memory setting is too low.
  424. echo To set this, go the your Command window properties,
  425. echo select the "Memory" tab, and change the
  426. echo "Initial Environment" setting to at least 1024.
  427. goto end2
  428. :usage
  429. echo Usage: cleank2.bat ^[INETSRV DIR^] ^[MTX DIR^] ^[INDEX DIR^]
  430. echo.
  431. echo Example: cleank2.bat c:\winnt\system32\inetsrv d:\mtx d:\index
  432. goto end
  433. :BadDir
  434. echo One of your directories is a root directory. This batch file is not
  435. echo designed to handle root directories.
  436. goto end
  437. :end
  438. echo.
  439. SET BINPATH=
  440. SET INETSRV=
  441. SET MTX=
  442. SET INDEX=
  443. SET STARTMENU=
  444. SET PLATFORM=
  445. :end2
  446. echo.