home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / business / mailman.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-06-05  |  8KB  |  204 lines

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