home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / DRAGONML.ZIP / INSTALL.BAT < prev    next >
Encoding:
DOS Batch File  |  1993-08-09  |  8.3 KB  |  225 lines

  1. @echo off
  2. cls
  3. rem -------------------------------------------
  4. rem  install batch file for version 1.51
  5. rem  of the St. Dragon Mailing List Manager.
  6. rem
  7. rem  Usage:
  8. rem         INSTALL [source] [destination]
  9. rem
  10. rem  Copyright (c) 1993 by
  11. rem  St. Dragon Enterprises, Sausalito, CA
  12. rem  All rights reserved.
  13. rem -------------------------------------------
  14.  
  15. rem set default installation
  16. set source=a:
  17. set dest=c:\dragon
  18.  
  19. rem check for help request
  20. if !%1 == !?    goto usage
  21. if !%1 == !/?   goto usage
  22. if !%1 == !-?   goto usage
  23. if !%1 == !HELP goto usage
  24. if !%1 == !help goto usage
  25. if !%1 == !Help goto usage
  26.  
  27. echo I--N--S--T--A--L--L        I--N--S--T--A--L--L        I--N--S--T--A--L--L
  28. echo  ----------------------------------------------------------------------
  29. echo  .    This is the St. Dragon Mailing List manager, version 1.51
  30. echo  .
  31. echo  .    Included on this diskette are the following files:
  32. echo  .
  33. echo  .    INSTALL.BAT -- The installation batch file for this system.
  34. echo  .    DRAGON.ZIP  -- The Mailing List Manager system.
  35. echo  .    REG.TXT     -- Registration information.
  36. echo  .
  37. echo  .  For detailed instructions about installation type in "INSTALL /?",
  38. echo  .  or see "INSTALLATION" in the reference manual.
  39. echo  .
  40. echo  .  NOTE - this file was archived using PKZIP version 2.04g.  Older
  41. echo  .  versions of PKUNZIP might not be able to handle it correctly.
  42. echo  ----------------------------------------------------------------------
  43. pause
  44.  
  45.  
  46. if !%1 == ! goto msg
  47. rem if the user specified a source, then use it.
  48. set source=%1
  49. if not exist %1\*.* goto error1
  50.  
  51. rem if the user specified a destination, then use it.
  52. if not !%2 == ! set dest=%2
  53.  
  54. rem
  55. rem check that destination is there, make it if it isn't and
  56. rem verify that it can be written to.
  57. rem 
  58.  
  59. rem if directory already exists with files in it, then just go on to msg.
  60. if exist %dest%\*.* goto msg
  61.  
  62. rem  create destination directory if it doesn't already exist
  63. rem  (pipe to nul on "md" doesn't work.  Do a CLS right after the
  64. rem  "md" to clear the "can't create directory" message which will
  65. rem  displayed if the directory already exists.
  66. md %dest%
  67. cls
  68.  
  69. rem verify that all files are present
  70. if not exist %source%\dragon.zip goto error3
  71.  
  72.  
  73. rem verify that the directory exists and can be written to
  74. if not exist %dest%\*.* echo "test" > %dest%\test
  75. if not exist %dest%\*.* goto error2
  76. if exist %dest%\test del %dest%\test
  77.  
  78.  
  79. :msg
  80. rem  installation advisory message
  81. cls
  82. echo I--N--S--T--A--L--L        I--N--S--T--A--L--L        I--N--S--T--A--L--L
  83. echo .
  84. echo .      -----------------------------------------------------------
  85. echo .                  The St. Dragon Mailing List Manager
  86. echo .                  ---  Version  1.51  ---
  87. echo .
  88. echo .              Install from drive %source% to %dest%
  89.  
  90. if not exist %dest%\*.* goto msgpart2
  91. echo .
  92. echo .        !WARNING! "%dest%" already exists and contains files.
  93. echo .            This installation may destroy existing files.
  94.  
  95. :msgpart2
  96. echo .
  97. echo .      -----------------------------------------------------------
  98. echo .           Press any key to continue or Ctrl-C to abort now
  99. echo .      -----------------------------------------------------------
  100. echo .
  101. echo .
  102. pause
  103.  
  104. cls
  105. pkunzip -d -o %source%\dragon.zip %dest%
  106. copy %source%\pkunzip*.* %dest%
  107. md %dest%\data
  108.  
  109. rem
  110. rem create a startup batch file and leave it in c:\
  111. rem will only work if mailman was installed on drive c:
  112. rem
  113. echo @echo off                                                    > c:\dragon.bat
  114. echo cls                                                         >> c:\dragon.bat
  115. echo echo ...Starting St. Dragon Mailing List Manager            >> c:\dragon.bat
  116. echo rem Start up Batch File for St. Dragon Mailing List Manager >> c:\dragon.bat
  117. echo rem Copyright (c) 1993                                      >> c:\dragon.bat
  118. echo rem by St. Dragon Enterprises, Sausalito, CA                >> c:\dragon.bat
  119. echo rem All Rights Reserved                                     >> c:\dragon.bat
  120. echo rem                                                         >> c:\dragon.bat
  121. echo rem If MailMan is not installed on drive C, then remove the >> c:\dragon.bat
  122. echo rem 'rem' in front of the correct drive letter listed here. >> c:\dragon.bat
  123. echo rem                                                         >> c:\dragon.bat
  124. echo C:                                                          >> c:\dragon.bat
  125. echo rem D:                                                      >> c:\dragon.bat
  126. echo rem E:                                                      >> c:\dragon.bat
  127. echo rem F:                                                      >> c:\dragon.bat
  128. echo rem G:                                                      >> c:\dragon.bat
  129. echo rem other: (supply your own)                                >> c:\dragon.bat
  130. echo rem                                                         >> c:\dragon.bat
  131. echo cd %dest%                                                   >> c:\dragon.bat
  132. echo if not exist mailman.exe goto error                         >> c:\dragon.bat
  133. echo mailman                                                     >> c:\dragon.bat
  134. echo goto end                                                    >> c:\dragon.bat
  135. echo :error                                                      >> c:\dragon.bat
  136. echo echo ----------------------------------------               >> c:\dragon.bat
  137. echo echo The MailMan system could not be located.               >> c:\dragon.bat
  138. echo echo Please see the file for more                           >> c:\dragon.bat
  139. echo echo for more information on this problem.                  >> c:\dragon.bat
  140. echo echo ----------------------------------------               >> c:\dragon.bat
  141. echo :end                                                        >> c:\dragon.bat
  142. echo c:                                                          >> c:\dragon.bat
  143. echo cd c:\                                                      >> c:\dragon.bat
  144.  
  145.  
  146. :complete
  147. rem  normal completion
  148. cls
  149. echo ---------------------------------------------------------
  150. echo . -----------------------------------------------------
  151. echo .    The St. Dragon Mailing List Manager  Version 1.51
  152. echo .  has been successfully installed.  To run it, go to
  153. echo .  %dest%, and type in MAILMAN.
  154. echo .
  155. echo . -----------------------------------------------------
  156. echo .  For information on how to register the product and
  157. echo .  to receive the latest version, along with a printed
  158. echo .  manual, press Shift-F1 after starting the MailMan
  159. echo .  and look at the "REGISTRATION" entry.
  160. echo . -----------------------------------------------------
  161. echo ---------------------------------------------------------
  162.  
  163. echo ======================================================
  164. echo .     To install the sample mailing list, please go to
  165. echo .     %dest% and type in "SAMPLE <enter>"
  166. echo ======================================================
  167. goto end
  168.  
  169.  
  170. :usage
  171. rem  no or incorrect parameters given
  172. echo  
  173. echo -------------------------------------------------
  174. echo .  Correct usage of this batch file is:
  175. echo .      INSTALL [source] [destination]
  176. echo .
  177. echo .  Example: (to install from a: to C:\DRAGON)
  178. echo .      INSTALL
  179. echo .
  180. echo .  Example: (to install to another directory)
  181. echo .      INSTALL a: c:\mailman
  182. echo .      INSTALL c:\download c:\realcool
  183. echo -------------------------------------------------
  184. goto end
  185.  
  186.  
  187. :error1
  188. rem  couldn't find source
  189. echo ----------------------------------------
  190. echo  Specified source "%source%" could
  191. echo  not be located or drive was not ready.
  192. echo  
  193. echo  Please check and try again.
  194. echo ----------------------------------------
  195. goto usage
  196.  
  197.  
  198. :error2
  199. rem  couldn't find or create destination
  200. echo --------------------------------------
  201. echo  Specified destination "%dest%"
  202. echo  could not be located or created.
  203. echo  
  204. echo  Please check that drive exists, that
  205. echo  there is space on it and that it can
  206. echo  be written to.
  207. echo --------------------------------------
  208. goto usage
  209.  
  210.  
  211.  
  212. :error3
  213. rem  couldn't locate dragon.zip
  214. echo -------------------------------------------
  215. echo  The file DRAGON.ZIP could not be located.
  216. echo  Be sure that SOURCE has been specified
  217. echo  correctly and that the file is present.
  218. echo -------------------------------------------
  219. goto usage
  220.  
  221.  
  222. :end
  223. set source=
  224. set dest=
  225.