home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / WAKE1F.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1995-05-21  |  5KB  |  201 lines

  1. @ECHO OFF
  2. cls
  3. echo                            DON'T WAKE THE SYSOP
  4. echo          Multi-Node Aware! More Than One Player At A Time!
  5. echo         -----------------------------------------------------
  6. echo         -----------------------------------------------------
  7. if "%1" == "new" goto go
  8. if "%1" == "upgrade" goto go
  9. if "%1" == "" goto exit
  10.  
  11. :exit
  12. echo ***** PLEASE RUN THE INSTALLATION WITH:
  13. echo If you are installing for the first time, please type:
  14. echo install new
  15. echo If you are installing an upgrade, please type:
  16. echo install upgrade
  17. goto end
  18.  
  19.  
  20. :go
  21. rem ***************************************
  22.  
  23. echo ***** Testing ability to set DOS attributes
  24. echo "TESTING ABILITY TO SET DOS ATTRIBUTES" > kill.txt
  25. attrib +R kill.txt
  26. del kill.txt
  27.  
  28. if not exist kill.txt goto ask
  29. if exist kill.txt goto kill3
  30.  
  31. rem ***************************************
  32.  
  33. :kill3
  34.    attrib -R kill.txt
  35.    del kill.txt
  36.    echo "Great! Passed DOS attribute test."
  37. echo         --------------------------------------------------
  38.    goto howto
  39.  
  40.  
  41. rem ***************************************
  42. :ask
  43. echo Installing DON'T WAKE THE SYSOP requires that all *.txt and *.exe 
  44. echo files be set to READ ONLY by using the dos attribute command.
  45. echo .
  46. echo This installation procedure normally takes care of this  
  47. echo automatically, but it appears you do not have this DOS command.
  48. echo You must MANUALLY set your attributes for *.txt and *.exe
  49. echo files to READ ONLY (+R) *AFTER* this installation completes. 
  50. echo .
  51. echo IF THIS IS AN UPGRADE: you must set all *.txt & *.exe files to 
  52. echo NOT READ ONLY *BEFORE* continuing so that the new files can 
  53. echo copy over the old files:
  54. echo ATTRIB -R *.*
  55. echo .
  56. echo If this is an upgrade, when it is done, you must set the attributes
  57. echo to NOT READ ONLY and perform the installation again so that the new
  58. echo files can copy over the old ones.
  59. echo If this is a new installation, please set the attributes AFTER
  60. echo the installation:
  61. echo ATTRIB +R *.TXT
  62. echo ATTRIB +R *.EXE
  63. goto howto
  64. rem ***************************************
  65.  
  66. rem ***************************************
  67. :howto
  68. echo         --------------------------------------------------
  69. if "%1" == "new" goto one
  70. if "%1" == "upgrade" goto two
  71.  
  72.  
  73. rem *************************************** FIRST TIME INSTALL
  74. :one
  75.  
  76. if exist game.zip goto zip
  77. if exist game.arj goto arj
  78. if exist game.rar goto rar
  79. echo Appears Archive has been changed from ZIP, must be manually installed.
  80. goto end
  81.  
  82. :zip
  83. pkunzip game.zip
  84. del game.zip
  85. goto one2
  86.  
  87. :arj
  88. arj e game.arj
  89. del game.arj
  90. goto one2
  91.  
  92. :rar
  93. rar e game.rar
  94. del game.rar
  95. goto one2
  96.  
  97. :one2
  98. attrib +R WAKE.EXE
  99. attrib +R *.txt
  100. goto success
  101. rem ***************************************
  102.  
  103.  
  104.  
  105. rem *************************************** UPGRADE
  106. :two
  107. rename maint.dbf mtemp1.dbf
  108.  
  109.  
  110. rem TAKE OUT FOR THIS VERSION, so will replace with 4 digit numeric field
  111. rem PUT BACK IN THIS VERSION:
  112.  
  113. rename players.cdx mtemp2.cdx
  114. rename players.dbf mtemp2.dbf
  115.  
  116. attrib -R WAKE.EXE
  117. attrib -R *.txt
  118.  
  119. if exist game.zip goto zip2
  120. if exist game.arj goto arj2
  121. if exist game.rar goto rar2
  122. echo Appears Archive has been changed from ZIP, must be manually installed.
  123. goto end
  124.  
  125.  
  126. :zip2
  127. pkunzip game.zip
  128. del game.zip
  129. goto one3
  130.  
  131. :arj2
  132. arj e game.arj
  133. del game.arj
  134. goto one3
  135.  
  136. :rar2
  137. rar e game.rar
  138. del game.rar
  139. goto one3
  140.  
  141. :one3
  142. attrib +R WAKE.EXE
  143. attrib +R *.txt
  144.  
  145. if exist mtemp1.dbf goto maint
  146. if not exist mtemp1.dbf goto go1
  147.  
  148. :maint
  149. del maint.dbf
  150. rename mtemp1.dbf maint.dbf
  151. del mtemp1.dbf
  152. goto go1
  153.  
  154. :go1
  155. if exist mtemp2.dbf goto play
  156. if not exist mtemp2.dbf goto go2
  157.  
  158. :play
  159. del players.dbf
  160. del players.cdx
  161. rename mtemp2.cdx players.cdx
  162. rename mtemp2.dbf players.dbf
  163. del mtemp2.dbf
  164. del mtemp2.cdx
  165. goto go2
  166.  
  167. :go2
  168. cls
  169. goto success
  170.  
  171. rem ***************************************
  172.  
  173. :success
  174. echo         --------------------------------------------------
  175. echo         --------------------------------------------------
  176. echo Read the SYSOP1 & 2 .DOC files if you have not done so.
  177. echo A sample.bat file for calling WAKE.EXE is included.
  178. echo The name of the file is sample.bat. Please refer to it
  179. echo for calling DON'T WAKE THE SYSOP from your node directory.
  180. echo         --------------------------------------------------
  181. echo A sample configuration file is included for those who
  182. echo REQUIRE it. If the game works fine when installing, you
  183. echo probably do not need to use the configuration file at all
  184. echo and do not need to even look at it.
  185. echo         --------------------------------------------------
  186. echo The sample.bat file tells how you must pass parameters on
  187. echo the command line for calling DON'T WAKE THE SYSOP IE: Call the 
  188. echo .exe, pass the drop file path and name, pass the node #, optionally
  189. echo pass the name of the configuration file. Drop file and node
  190. echo number must be passed even for single line BBS's.
  191. echo --------------------------------------------------------------
  192. echo wake c:\bbs\node1\dorinfo1.def 1 sss.cfg
  193. echo --------------------------------------------------------------
  194. echo FOR SYSOP MODE: wake sysop
  195. echo SEE BEGINNING OF SYSOP1.DOC FOR NIGHTLY MAINTENANCE INFO
  196. echo --------------------------------------------------------------
  197.  
  198. goto end
  199.  
  200. :end
  201.