home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 3.3 / 1997-06_Disc_3.3.iso / kknd / dont_run.zip / KILLKKND.BAT < prev    next >
DOS Batch File  |  1997-01-16  |  14KB  |  588 lines

  1. rem  KKnD Uninstaller.
  2. rem  Andrew Buttery, 21st November 1996
  3. rem  
  4. @echo off
  5. cls
  6. echo KKnd Uninstaller
  7. echo.
  8. echo The following uninstaller is provided to ease uninstallation of
  9. echo KKnD from your system however you use it at your own risk.
  10. echo.
  11.  
  12. rem Does the user want the full help page or have they forgotten to
  13. rem specify a path ?
  14.  
  15. if "%1"=="?" goto page_help
  16. if "%1"=="" goto page_help
  17.  
  18. rem  OK... let's check that the path exists...
  19.  
  20. if not exist %1\nul goto err_no_path
  21. if not exist %1\kknd.exe goto err_no_kknd
  22.  
  23. rem OK... found the directory let's start deleting... very carefully...
  24. rem In fact lets make sure...
  25.  
  26. echo Found specified directory do you wish to continue unistalling
  27. echo Press Ctrl-C now to abort . . . or
  28. pause
  29.  
  30. rem Got the go ahead... delete away !!!
  31. rem Move the current directory to the root as they won't be able
  32. rem to delete dirs if current directory is set to inside the KKnD
  33. rem directory structure.
  34.  
  35. cd \
  36.  
  37. rem ----------------------------------------------------------------------
  38. rem Start with the 640 Directory...
  39.  
  40. if not exist %1\levels\640\nul goto no_640
  41. echo Found 640 Directory...
  42.  
  43. if not exist %1\levels\640\surv_01.lvl goto no_s_01
  44. echo Deleting Surv01.lvl...
  45. del %1\levels\640\surv_01.lvl
  46. :no_s_01
  47.  
  48. if not exist %1\levels\640\surv_02.lvl goto no_s_02
  49. echo Deleting Surv02.lvl...
  50. del %1\levels\640\surv_02.lvl
  51. :no_s_02
  52.  
  53. if not exist %1\levels\640\surv_03.lvl goto no_s_03
  54. echo Deleting Surv03.lvl...
  55. del %1\levels\640\surv_03.lvl
  56. :no_s_03
  57.  
  58. if not exist %1\levels\640\surv_04.lvl goto no_s_04
  59. echo Deleting Surv04.lvl...
  60. del %1\levels\640\surv_04.lvl
  61. :no_s_04
  62.  
  63. if not exist %1\levels\640\surv_05.lvl goto no_s_05
  64. echo Deleting Surv05.lvl...
  65. del %1\levels\640\surv_05.lvl
  66. :no_s_05
  67.  
  68. if not exist %1\levels\640\surv_06.lvl goto no_s_06
  69. echo Deleting Surv06.lvl...
  70. del %1\levels\640\surv_06.lvl
  71. :no_s_06
  72.  
  73. if not exist %1\levels\640\surv_07.lvl goto no_s_07
  74. echo Deleting Surv07.lvl...
  75. del %1\levels\640\surv_07.lvl
  76. :no_s_07
  77.  
  78. if not exist %1\levels\640\surv_08.lvl goto no_s_08
  79. echo Deleting Surv08.lvl...
  80. del %1\levels\640\surv_08.lvl
  81. :no_s_08
  82.  
  83. if not exist %1\levels\640\surv_09.lvl goto no_s_09
  84. echo Deleting Surv09.lvl...
  85. del %1\levels\640\surv_09.lvl
  86. :no_s_09
  87.  
  88. if not exist %1\levels\640\surv_10.lvl goto no_s_10
  89. echo Deleting Surv10.lvl...
  90. del %1\levels\640\surv_10.lvl
  91. :no_s_10
  92.  
  93. if not exist %1\levels\640\surv_11.lvl goto no_s_11
  94. echo Deleting Surv11.lvl...
  95. del %1\levels\640\surv_11.lvl
  96. :no_s_11
  97.  
  98. if not exist %1\levels\640\surv_12.lvl goto no_s_12
  99. echo Deleting Surv12.lvl...
  100. del %1\levels\640\surv_12.lvl
  101. :no_s_12
  102.  
  103. if not exist %1\levels\640\surv_13.lvl goto no_s_13
  104. echo Deleting Surv13.lvl...
  105. del %1\levels\640\surv_13.lvl
  106. :no_s_13
  107.  
  108. if not exist %1\levels\640\surv_14.lvl goto no_s_14
  109. echo Deleting Surv14.lvl...
  110. del %1\levels\640\surv_14.lvl
  111. :no_s_14
  112.  
  113. if not exist %1\levels\640\surv_15.lvl goto no_s_15
  114. echo Deleting Surv15.lvl...
  115. del %1\levels\640\surv_15.lvl
  116. :no_s_15
  117.  
  118. rem Now delete the Mute... um, oops, the Evolved levels...
  119.  
  120. if not exist %1\levels\640\Mute_01.lvl goto no_m_01
  121. echo Deleting Mute01.lvl...
  122. del %1\levels\640\Mute_01.lvl
  123. :no_m_01
  124.  
  125. if not exist %1\levels\640\Mute_02.lvl goto no_m_02
  126. echo Deleting Mute02.lvl...
  127. del %1\levels\640\Mute_02.lvl
  128. :no_m_02
  129.  
  130. if not exist %1\levels\640\Mute_03.lvl goto no_m_03
  131. echo Deleting Mute03.lvl...
  132. del %1\levels\640\Mute_03.lvl
  133. :no_m_03
  134.  
  135. if not exist %1\levels\640\Mute_04.lvl goto no_m_04
  136. echo Deleting Mute04.lvl...
  137. del %1\levels\640\Mute_04.lvl
  138. :no_m_04
  139.  
  140. if not exist %1\levels\640\Mute_05.lvl goto no_m_05
  141. echo Deleting Mute05.lvl...
  142. del %1\levels\640\Mute_05.lvl
  143. :no_m_05
  144.  
  145. if not exist %1\levels\640\Mute_06.lvl goto no_m_06
  146. echo Deleting Mute06.lvl...
  147. del %1\levels\640\Mute_06.lvl
  148. :no_m_06
  149.  
  150. if not exist %1\levels\640\Mute_07.lvl goto no_m_07
  151. echo Deleting Mute07.lvl...
  152. del %1\levels\640\Mute_07.lvl
  153. :no_m_07
  154.  
  155. if not exist %1\levels\640\Mute_08.lvl goto no_m_08
  156. echo Deleting Mute08.lvl...
  157. del %1\levels\640\Mute_08.lvl
  158. :no_m_08
  159.  
  160. if not exist %1\levels\640\Mute_09.lvl goto no_m_09
  161. echo Deleting Mute09.lvl...
  162. del %1\levels\640\Mute_09.lvl
  163. :no_m_09
  164.  
  165. if not exist %1\levels\640\Mute_10.lvl goto no_m_10
  166. echo Deleting Mute10.lvl...
  167. del %1\levels\640\Mute_10.lvl
  168. :no_m_10
  169.  
  170. if not exist %1\levels\640\Mute_11.lvl goto no_m_11
  171. echo Deleting Mute11.lvl...
  172. del %1\levels\640\Mute_11.lvl
  173. :no_m_11
  174.  
  175. if not exist %1\levels\640\Mute_12.lvl goto no_m_12
  176. echo Deleting Mute12.lvl...
  177. del %1\levels\640\Mute_12.lvl
  178. :no_m_12
  179.  
  180. if not exist %1\levels\640\Mute_13.lvl goto no_m_13
  181. echo Deleting Mute13.lvl...
  182. del %1\levels\640\Mute_13.lvl
  183. :no_m_13
  184.  
  185. if not exist %1\levels\640\Mute_14.lvl goto no_m_14
  186. echo Deleting Mute14.lvl...
  187. del %1\levels\640\Mute_14.lvl
  188. :no_m_14
  189.  
  190. if not exist %1\levels\640\Mute_15.lvl goto no_m_15
  191. echo Deleting Mute15.lvl...
  192. del %1\levels\640\Mute_15.lvl
  193. :no_m_15
  194.  
  195. Rem Now deleting the Multi player levels... please stand by !!!
  196.  
  197. if not exist %1\levels\640\Mlti_01.lvl goto no_mp_01
  198. echo Deleting Mlti01.lvl...
  199. del %1\levels\640\Mlti_01.lvl
  200. :no_mp_01
  201.  
  202. if not exist %1\levels\640\Mlti_02.lvl goto no_mp_02
  203. echo Deleting Mlti02.lvl...
  204. del %1\levels\640\Mlti_02.lvl
  205. :no_mp_02
  206.  
  207. if not exist %1\levels\640\Mlti_03.lvl goto no_mp_03
  208. echo Deleting Mlti03.lvl...
  209. del %1\levels\640\Mlti_03.lvl
  210. :no_mp_03
  211.  
  212. if not exist %1\levels\640\Mlti_04.lvl goto no_mp_04
  213. echo Deleting Mlti04.lvl...
  214. del %1\levels\640\Mlti_04.lvl
  215. :no_mp_04
  216.  
  217. if not exist %1\levels\640\Mlti_05.lvl goto no_mp_05
  218. echo Deleting Mlti05.lvl...
  219. del %1\levels\640\Mlti_05.lvl
  220. :no_mp_05
  221.  
  222. if not exist %1\levels\640\Mlti_06.lvl goto no_mp_06
  223. echo Deleting Mlti06.lvl...
  224. del %1\levels\640\Mlti_06.lvl
  225. :no_mp_06
  226.  
  227. if not exist %1\levels\640\Mlti_07.lvl goto no_mp_07
  228. echo Deleting Mlti07.lvl...
  229. del %1\levels\640\Mlti_07.lvl
  230. :no_mp_07
  231.  
  232. if not exist %1\levels\640\Mlti_08.lvl goto no_mp_08
  233. echo Deleting Mlti08.lvl...
  234. del %1\levels\640\Mlti_08.lvl
  235. :no_mp_08
  236.  
  237. if not exist %1\levels\640\Mlti_09.lvl goto no_mp_09
  238. echo Deleting Mlti09.lvl...
  239. del %1\levels\640\Mlti_09.lvl
  240. :no_mp_09
  241.  
  242. if not exist %1\levels\640\Mlti_10.lvl goto no_mp_10
  243. echo Deleting Mlti10.lvl...
  244. del %1\levels\640\Mlti_10.lvl
  245. :no_mp_10
  246.  
  247. if not exist %1\levels\640\FMV.lvl goto no_fmv
  248. echo Deleting FMV.lvl...
  249. del %1\levels\640\FMV.lvl
  250. :no_fmv
  251.  
  252. if not exist %1\levels\640\sprites.lvl goto no_sprite
  253. echo Deleting Sprites.lvl...
  254. del %1\levels\640\sprites.lvl
  255. :no_sprite
  256.  
  257. if not exist %1\levels\640\super.lvl goto no_super
  258. echo Deleting Super.lvl...
  259. del %1\levels\640\super.lvl
  260. :no_super
  261.  
  262. if not exist %1\levels\640\supspr.lvl goto no_supspr
  263. echo Deleting Supspr.lvl...
  264. del %1\levels\640\supspr.lvl
  265. :no_supspr
  266.  
  267. if not exist %1\levels\640\wait.lvl goto no_wait
  268. echo Deleting Wait.lvl...
  269. del %1\levels\640\Wait.lvl
  270. :no_wait
  271.  
  272. echo Deleting 640 Directory...
  273. rd %1\levels\640
  274. echo.
  275. :no_640
  276.  
  277. rem Then delete the Levels Directory...
  278.  
  279. if not exist %1\levels\nul goto no_levels
  280. echo Found Levels Directory...
  281.  
  282. if not exist %1\levels\Multi.pal goto no_m_pal
  283. echo Deleting Multi.pal...
  284. del %1\levels\multi.pal
  285. :no_m_pal
  286.  
  287. if not exist %1\levels\Mute.slv goto no_m_slv
  288. echo Deleting Mute.slv...
  289. del %1\levels\Mute.slv
  290. :no_m_slv
  291.  
  292. if not exist %1\levels\Surv.slv goto no_s_slv
  293. echo Deleting Surv.slv...
  294. del %1\levels\Surv.slv
  295. :no_s_slv
  296.  
  297. if not exist %1\levels\Super.slv goto no_su_slv
  298. echo Deleting Super.slv...
  299. del %1\levels\Super.slv
  300. :no_su_slv
  301.  
  302. echo Deleting Levels Directory...
  303. rd %1\levels
  304. echo.
  305. :no_levels
  306.  
  307. rem Then delete the KKnD Root Directory...
  308.  
  309. if not exist %1\HMIdet.386 goto no_hmidet
  310. echo Deleting HMIdet.386...
  311. del %1\HMIdet.386
  312. :no_hmidet
  313.  
  314. if not exist %1\HMIdrv.386 goto no_hmidrv
  315. echo Deleting HMIdrv.386...
  316. del %1\HMIdrv.386
  317. :no_hmidrv
  318.  
  319. if not exist %1\kknd.cfg goto no_kcfg
  320. echo Deleting KKnD.cfg...
  321. del %1\kknd.cfg
  322. :no_kcfg
  323.  
  324. if not exist %1\kknd.exe goto no_kexe
  325. echo Deleting KKnD.exe...
  326. del %1\kknd.exe
  327. :no_kexe
  328.  
  329. if not exist %1\kkndicon.ico goto no_kico
  330. echo Deleting KKnD.ico...
  331. attrib %1\kkndicon.ico -H
  332. del %1\kkndicon.ico
  333. :no_kico
  334.  
  335. if not exist %1\kknd.pif goto no_kpif
  336. echo Deleting KKnD.pif...
  337. del %1\kknd.pif
  338. :no_kpif
  339.  
  340. if not exist %1\serial.cfg goto no_scfg
  341. echo Deleting Serial.cfg...
  342. del %1\serial.cfg
  343. :no_scfg
  344.  
  345. if not exist %1\units.cfg goto no_ucfg
  346. echo Deleting Units.cfg...
  347. del %1\units.cfg
  348. :no_ucfg
  349.  
  350. if not exist %1\uvconfig.dat goto no_uvdat
  351. echo Deleting Uvconfig.dat...
  352. del %1\uvconfig.dat
  353. :no_uvdat
  354.  
  355. if not exist %1\uvconfig.exe goto no_uvexe
  356. echo Deleting Uvconfig.exe...
  357. del %1\uvconfig.exe
  358. :no_uvexe
  359.  
  360. if not exist %1\univbe.drv goto no_uvdrv
  361. echo Deleting Univbe.drv...
  362. del %1\univbe.drv
  363. :no_uvdrv
  364.  
  365. if not exist %1\track.log goto no_trlog
  366. echo Deleting Track.log...
  367. del %1\track.log
  368. :no_trlog
  369.  
  370. if not exist %1\readme.txt goto no_readme
  371. echo Deleting Readme.txt...
  372. del %1\readme.txt
  373. :no_readme
  374.  
  375. if not exist %1\modem.lst goto no_mlst
  376. echo Deleting Modem.lst...
  377. del %1\modem.lst
  378. :no_mlst
  379.  
  380. if not exist %1\save.lst goto no_slst
  381. echo Deleting Save.lst...
  382. del %1\save.lst
  383. :no_slst
  384.  
  385. if not exist %1\kknd.sve goto no_ksve
  386. echo Deleting KKnD.sve...
  387. del %1\kknd.sve
  388. :no_ksve
  389.  
  390. if not exist %1\game0.sav goto no_g0
  391. echo Deleting Game0.sav...
  392. del %1\game0.sav
  393. :no_g0
  394.  
  395. if not exist %1\game1.sav goto no_g1
  396. echo Deleting Game1.sav...
  397. del %1\game1.sav
  398. :no_g1
  399.  
  400. if not exist %1\game2.sav goto no_g2
  401. echo Deleting Game2.sav...
  402. del %1\game2.sav
  403. :no_g2
  404.  
  405. if not exist %1\game3.sav goto no_g3
  406. echo Deleting Game3.sav...
  407. del %1\game3.sav
  408. :no_g3
  409.  
  410. if not exist %1\game4.sav goto no_g4
  411. echo Deleting Game4.sav...
  412. del %1\game4.sav
  413. :no_g4
  414.  
  415. if not exist %1\game5.sav goto no_g5
  416. echo Deleting Game5.sav...
  417. del %1\game5.sav
  418. :no_g5
  419.  
  420. if not exist %1\game6.sav goto no_g6
  421. echo Deleting Game6.sav...
  422. del %1\game6.sav
  423. :no_g6
  424.  
  425. if not exist %1\game7.sav goto no_g7
  426. echo Deleting Game7.sav...
  427. del %1\game7.sav
  428. :no_g7
  429.  
  430. if not exist %1\game8.sav goto no_g8
  431. echo Deleting Game8.sav...
  432. del %1\game8.sav
  433. :no_g8
  434.  
  435. if not exist %1\game9.sav goto no_g9
  436. echo Deleting Game9.sav...
  437. del %1\game9.sav
  438. :no_g9
  439.  
  440. if not exist %1\game10.sav goto no_g10
  441. echo Deleting Game10.sav...
  442. del %1\game10.sav
  443. :no_g10
  444.  
  445. if not exist %1\game11.sav goto no_g11
  446. echo Deleting Game11.sav...
  447. del %1\game11.sav
  448. :no_g11
  449.  
  450. if not exist %1\game12.sav goto no_g12
  451. echo Deleting Game12.sav...
  452. del %1\game12.sav
  453. :no_g12
  454.  
  455. if not exist %1\game13.sav goto no_g13
  456. echo Deleting Game13.sav...
  457. del %1\game13.sav
  458. :no_g13
  459.  
  460. if not exist %1\game14.sav goto no_g14
  461. echo Deleting Game14.sav...
  462. del %1\game14.sav
  463. :no_g14
  464.  
  465. if not exist %1\game15.sav goto no_g15
  466. echo Deleting Game15.sav...
  467. del %1\game15.sav
  468. :no_g15
  469.  
  470. if not exist %1\game16.sav goto no_g16
  471. echo Deleting Game16.sav...
  472. del %1\game16.sav
  473. :no_g16
  474.  
  475. if not exist %1\game17.sav goto no_g17
  476. echo Deleting Game17.sav...
  477. del %1\game17.sav
  478. :no_g17
  479.  
  480. if not exist %1\game18.sav goto no_g18
  481. echo Deleting Game18.sav...
  482. del %1\game18.sav
  483. :no_g18
  484.  
  485. if not exist %1\game19.sav goto no_g19
  486. echo Deleting Game19.sav...
  487. del %1\game19.sav
  488. :no_g19
  489.  
  490. echo Deleting %1 Directory...
  491. rd %1
  492. echo.
  493.  
  494. if not exist c:\kknd.cfg goto no_kccfg
  495. echo Deleting KKnD.cfg from root of C:\ ...
  496. del c:\kknd.cfg
  497. :no_kccfg
  498.  
  499. if not exist c:\kknd.mem goto no_kcmem
  500. echo Deleting KKnD.mem from root of C:\ ...
  501. del c:\kknd.mem
  502. :no_kcmem
  503.  
  504. if not exist c:\thevoice.cfg goto no_tvcfg
  505. echo Deleting TheVoice.cfg from root of C:\ ...
  506. del c:\thevoice.cfg
  507. :no_tvcfg
  508.  
  509. if exist %1\killkknd.bat goto err_not_comp
  510.  
  511. echo.
  512. echo KKnD should now have been uninstalled.
  513. goto exit
  514.  
  515.  
  516. rem ---------------------------------------------------------------------
  517. rem Error Messages go here...
  518.  
  519. :err_no_path
  520. echo.
  521. echo I could not locate KKnD in the directoy you have specified
  522. echo (%1\).
  523. echo Please note that the uninstaller appends a \ to the path you specify
  524. echo which may cause this error. Please try again.
  525. echo.
  526. goto exit
  527.  
  528. :err_no_kknd
  529. echo.
  530. echo The directory you specified exists but I could not locate the KKnD
  531. echo executable in the directory you have specified:
  532. echo (%1\).
  533. echo Please note that the uninstaller appends a \ to the path you specify
  534. echo which may cause this error. Please try again.
  535. echo.
  536. goto exit
  537.  
  538. :err_not_comp
  539. echo.
  540. echo Killkknd could not remove the %1 Directory as Killkknd.bat was not
  541. echo moved out of the %1 Directory before being executed. 
  542. echo.
  543. goto exit
  544.  
  545. rem ---------------------------------------------------------------------
  546. rem The big help page goes here...
  547.  
  548. :page_help
  549. echo.
  550. echo This batch file is designed to help unistall KKnD from your hard
  551. echo drive. To use the unistaller use the following syntax:
  552. echo.
  553. echo    killkknd [install_path]
  554. echo.
  555. echo Where the install_path in the brackets is the directory where the
  556. echo KKnD.exe resides. So if KKnD is installed in your E:\games directory
  557. echo the syntax to remove it would be...
  558. echo.
  559. echo    killkknd e:\games\KKnD
  560. echo.
  561. echo Every file is specifically deleted (none of that DelTree or Del *.*
  562. echo inaccuracy !) and then the directory removed.
  563. pause
  564. cls
  565. echo.
  566. echo Possible problems.
  567. echo.
  568. echo The KillKKnD Uninstaller appends a \ to the path that you specify
  569. echo and this may cause a problem. Renter the path without the trailing
  570. echo \ character.
  571. echo.
  572. echo If you have copied any files into the KKnD directory or other parts
  573. echo of the KKnD directory structure the Uninstaller will not be able to
  574. echo remove all the directories. If you move the offending files and copy
  575. echo a junk file to the directory where the kknd.exe was and rename it
  576. echo kknd.exe and run the Uninstaller again it should clean everything up.
  577. echo.
  578. echo If you haven't moved the KillKKnD.bat file out of the directory
  579. echo where KKnD is installed it will not completely remove the KKnD
  580. echo directory structure. You need to move the KillKKnD.bat file before
  581. echo running it.
  582. echo.
  583. goto exit
  584.  
  585. rem It's all over Red Rover...
  586. :exit
  587.  
  588.