home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PERSONAL / STAT212.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1994-03-22  |  7KB  |  189 lines

  1. echo off
  2. cls
  3. rem Installation batch file for STATMAN.
  4.  
  5. rem user must specify a valid drive letter (C to F)
  6. if %1. == . goto nodrive
  7. if %1 == c: goto start
  8. if %1 == C: goto start
  9. if %1 == d: goto start
  10. if %1 == D: goto start
  11. if %1 == e: goto start
  12. if %1 == E: goto start
  13. if %1 == f: goto start
  14. if %1 == F: goto start
  15. goto invaliddrive
  16.  
  17. :start
  18.  
  19. echo ╔═══════════════════════════════════════════════════════════════════════╗
  20. echo ║                                                                       ║
  21. echo ║                STATMAN Fantasy Baseball Installation                  ║
  22. echo ║                                                                       ║
  23. echo ║   This will create a directory called %1\STATMAN on your hard disk,   ║
  24. echo ║   and will install STATMAN Fantasy Baseball in that directory.        ║
  25. echo ║                                                                       ║
  26. echo ║   You will need about 1 megabyte of free disk space on your hard      ║
  27. echo ║   disk to install STATMAN.                                            ║
  28. echo ║                                                                       ║
  29. echo ║    If you don't want to install STATMAN at this time, press Ctrl-C.   ║
  30. echo ║                                                                       ║
  31. echo ╚═══════════════════════════════════════════════════════════════════════╝
  32. pause
  33.  
  34. rem check for \statman on the specified drive
  35. chmod -hr %1\statman\*.*
  36. if not exist %1\statman\*.* goto createdirectory
  37. del %1\statman\*.*
  38.  
  39. rem create \statman on the specified drive
  40. :createdirectory
  41. echo 
  42. echo Creating directory %1\STATMAN
  43. md %1\statman
  44. rem create \statman\yearly on the specified drive
  45. echo Creating directory %1\STATMAN\YEARLY
  46. md %1\statman\yearly
  47. rem create \statman\update on the specified drive
  48. echo Creating directory %1\STATMAN\UPDATE
  49. md %1\statman\update
  50.  
  51. :1
  52.  
  53. rem make sure default drive contains the program disk
  54. if exist statman.exe goto 2
  55. echo 
  56. echo Insert the PROGRAM DISK at this time.
  57. pause
  58. goto 1
  59.  
  60. :2
  61.  
  62. rem copy files to hard disk
  63. echo 
  64. echo Copying STATMAN.EXE....
  65. copy statman.exe %1\statman
  66. if not exist %1\statman\statman.exe goto installerror
  67.  
  68. if not exist makefile.exe goto 3
  69. makefile %1\statman
  70.  
  71. :3
  72. rem make sure default drive contains the DATA DISK
  73.  
  74. if exist makedb.exe goto 4
  75. echo 
  76. echo Insert the DATA DISK at this time.
  77. pause
  78. goto 3
  79.  
  80. :4
  81.  
  82. rem copy data files to hard disk
  83.  
  84. echo 
  85. echo Copying MLTEAMS.DB....
  86. copy mlteams.db %1\statman
  87. if not exist %1\statman\mlteams.db goto installerror
  88.  
  89. echo 
  90. echo Copying HELP.DAT....
  91. copy *.dat %1\statman
  92. if not exist %1\statman\help.dat goto installerror
  93.  
  94. rem copy PLAYER database files to hard disk
  95.  
  96. echo 
  97. echo Copying STATMAN files to build PLAYER Database....
  98. copy makedb.exe %1\statman\yearly
  99. if not exist %1\statman\yearly\makedb.exe goto installerror
  100.  
  101. copy *.ros %1\statman\yearly
  102. if not exist %1\statman\yearly\*.ros goto installerror
  103.  
  104. rem build PLAYER database
  105.  
  106. echo 
  107. echo Building PLAYER Database....
  108. echo this may take a few minutes...
  109. %1
  110. cd \statman\yearly
  111. makedb %1\statman\yearly player93.ros
  112. del *.exe
  113. del *.ros
  114.  
  115. rem leave user ready to start... in %1\statman
  116. %1
  117. cd \statman
  118.  
  119. echo 
  120. echo STATMAN has been correctly installed.
  121. echo 
  122. echo To start STATMAN, type STATMAN at the DOS prompt.
  123.  
  124. goto done
  125.  
  126. rem --- user didn't specify a drive letter followed by a colon.
  127. :nodrive
  128. echo ╔═══════════════════════════════════════════════════════════════════════╗
  129. echo ║                                                                       ║
  130. echo ║                          INSTALLATION ERROR!                          ║
  131. echo ║                                                                       ║
  132. echo ║        To install STATMAN on your hard disk, you MUST specify         ║
  133. echo ║        the drive to install STATMAN onto.                             ║
  134. echo ║          Example:                                                     ║
  135. echo ║                  to install STATMAN on drive C                        ║
  136. echo ║                  type "INSTALL C:" and press Enter.                   ║
  137. echo ║                                                                       ║
  138. echo ╚═══════════════════════════════════════════════════════════════════════╝
  139. goto errorDone
  140.  
  141. rem --- user specified invalid drive letter.
  142. :invaliddrive
  143. echo ╔═══════════════════════════════════════════════════════════════════════╗
  144. echo ║                                                                       ║
  145. echo ║                          INSTALLATION ERROR!                          ║
  146. echo ║                                                                       ║
  147. echo ║          The hard drive letter MUST be a VALID drive letter           ║
  148. echo ║          from C to F and MUST be followed by a colon.                 ║
  149. echo ║            Example:                                                   ║
  150. echo ║                    to install STATMAN on drive C                      ║
  151. echo ║                    type "INSTALL C:" and press Enter.                 ║  
  152. echo ║                                                                       ║
  153. echo ╚═══════════════════════════════════════════════════════════════════════╝
  154. goto errorDone
  155.  
  156. rem --- general installation error.
  157. :installationerror
  158. echo ╔═══════════════════════════════════════════════════════════════════════╗
  159. echo ║                                                                       ║
  160. echo ║                          INSTALLATION ERROR!                          ║
  161. echo ║                                                                       ║
  162. echo ║          Perhaps there isn't enough space on your hard disk.          ║
  163. echo ║        Installation requires at least 1 megabyte of free space!       ║
  164. echo ║                                                                       ║
  165. echo ╚═══════════════════════════════════════════════════════════════════════╝
  166. goto errorDone
  167.  
  168. rem --- dir already exists.
  169. :directorythere
  170. echo ╔═══════════════════════════════════════════════════════════════════════╗
  171. echo ║                                                                       ║
  172. echo ║                          INSTALLATION ERROR!                          ║
  173. echo ║                                                                       ║
  174. echo ║      The %1\STATMAN directory already exists on this disk drive!      ║
  175. echo ║      Delete this directory and all files in it and try again.         ║
  176. echo ║                                                                       ║
  177. echo ╚═══════════════════════════════════════════════════════════════════════╝
  178. goto errorDone
  179.  
  180. rem --- goto here after an error is detected, to print a message and exit.
  181. :errorDone
  182. echo 
  183. echo STATMAN was not installed correctly.
  184. echo 
  185.  
  186. rem --- exit batch file.
  187. :done
  188. 
  189.