home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / MAGICM20.ZIP / MAGICM20.TD0 / UNINSTAL.BAT < prev   
Encoding:
DOS Batch File  |  1990-04-02  |  4.4 KB  |  149 lines

  1. echo off
  2. cls
  3. if %2x==x goto badargs
  4. if exist %1:testmm.com %1:
  5. if exist %1testmm.com %1
  6. if not exist testmm.com goto notest
  7. testmm un %1 %2
  8. if errorlevel 4 goto same
  9. if errorlevel 3 goto slash
  10. if errorlevel 2 goto badargs
  11. if errorlevel 1 goto argsok
  12. uninstal %1: %2:
  13. :slash
  14. uninstall %1 %2\
  15. :argsok
  16. if exist %2id.mm goto badfiles
  17. goto argsok2
  18. :same
  19. copy a:uninstal.bat b: > nul
  20. if NOT exist b:id.mm goto argsok2
  21. del b:uninstal.bat > nul
  22. goto badfiles
  23. :argsok2
  24. echo     
  25. echo    This batch will un-install the Magic Mirror Software from your disk(ette).
  26. echo    The ORIGINAL Magic Mirror Software diskette should now be in drive %1,    
  27. testmm ud %1 %2
  28. echo     
  29. echo    If this is not correct, then type the CTRL and BREAK keys together
  30. echo    to end this process now, and then restart providing the proper drives
  31. echo    and output directory.     
  32. echo         
  33. echo    For example, you might enter   UNINSTALL A: C:\MMIRROR   if you were
  34. echo    removing Magic Mirror from drive C in directory MMIRROR, and the 
  35. echo    Magic Mirror diskette was in drive A.
  36. echo         
  37. echo    If everything is OK, then this process will continue after you type a key.
  38. echo     
  39. pause
  40. cls
  41. echo        ╔══════════════════════════════════════════════╗
  42. echo        ║                                              ║
  43. echo        ║    Magic Mirror Software Un-Install Batch    ║
  44. echo        ║    ──────────────────────────────────────    ║
  45. echo        ║                                              ║
  46. echo        ╚══════════════════════════════════════════════╝
  47. echo     
  48.  
  49. if not exist id.mm goto badfiles
  50. if errorlevel 4 goto onedrive
  51.  
  52. if exist %2mm.isc goto foundfiles
  53. if exist %2mmconfig.com goto foundfiles
  54. if exist %2mmconfig.sys goto foundfiles
  55. if exist %2mmlib.exe goto foundfiles
  56. if not exist %2mmswitch.com goto notthere
  57. :foundfiles
  58. echo     
  59. echo        Magic Mirror Un-install commencing now ...
  60.  
  61. del %2mm*.*
  62. del %2help.bat
  63. goto copydone
  64.  
  65. :onedrive
  66. if not exist b:mmconfig.com goto notthere
  67. echo     
  68. echo        Magic Mirror Un-install commencing now ...
  69. del b:mm*.*
  70. del b:help.bat
  71. del b:uninstal.bat
  72. cls
  73. echo        ╔══════════════════════════════════════════════╗
  74. echo        ║                                              ║
  75. echo        ║    Magic Mirror Software Un-Install Batch    ║
  76. echo        ║    ──────────────────────────────────────    ║
  77. echo        ║                                              ║
  78. echo        ╚══════════════════════════════════════════════╝
  79. echo     
  80. :copydone
  81. testmm rd %1 %2
  82. echo         
  83. echo         
  84. echo    The Magic Mirror un-install procedure has now completed successfully.
  85. echo         
  86. echo         
  87. goto ender
  88.  
  89. :notthere
  90. echo          Magic Mirror Software is not installed on %2!
  91. echo        
  92. echo        
  93. goto ender
  94.  
  95. :notest
  96. cls
  97. echo        ╔══════════════════════════════════════════════╗
  98. echo        ║                                              ║
  99. echo        ║    Magic Mirror Software Un-Install Batch    ║
  100. echo        ║    ──────────────────────────────────────    ║
  101. echo        ║                                              ║
  102. echo        ╚══════════════════════════════════════════════╝
  103. echo     
  104. echo         
  105. echo         
  106. echo    The ORIGINAL Magic Mirror Software disk must be in drive %1!
  107. echo        
  108. echo    There should be a TESTMM.COM file on the input drive.
  109. echo    Check the drives entered for accuracy.
  110. echo        
  111. echo         
  112. goto done
  113. :badfiles
  114. echo    One or more of the Magic Mirror Software files are not found!
  115.  
  116. :badargs
  117. cls
  118. echo        ╔══════════════════════════════════════════════╗
  119. echo        ║                                              ║
  120. echo        ║    Magic Mirror Software Un-Install Batch    ║
  121. echo        ║    ──────────────────────────────────────    ║
  122. echo        ║                                              ║
  123. echo        ╚══════════════════════════════════════════════╝
  124. echo     
  125. echo         
  126. echo    In order for this batch to run correctly, you must supply the drive
  127. echo    letters when starting.
  128. echo         
  129. echo    The first drive letter is for the drive which contains the Magic Mirror
  130. echo    Software diskette.  The second drive letter is for the hard disk or
  131. echo    diskette from which the Magic Mirror Software will be removed.
  132. echo         
  133. echo    For example, you might enter   UNINSTALL A: C:     if you were
  134. echo    removing Magic Mirror from drive C, and the Magic Mirror diskette
  135. echo    was in drive A.
  136. echo         
  137. echo    Please restart this batch, and include both drive letters.
  138. echo         
  139. echo         
  140. goto done
  141. :ender
  142. if %1\x==%2x goto endone
  143. goto done
  144. :endone    
  145. if not exist b:uninstall.bat goto done
  146. del b:uninstall.bat > nul
  147. :done
  148.  
  149.