home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / ALF20WB.ZIP / INSTALL.BAT < prev    next >
Encoding:
DOS Batch File  |  1995-12-01  |  8.9 KB  |  303 lines

  1. @echo off
  2. cls
  3. echo.
  4. echo   ─────────── INSTALL for ALF v2.0wb ───────────  
  5. echo.
  6. if (%1)==() goto novar
  7. if not (%2)==() goto run
  8. echo    Text Editor and Batch File are both required
  9. echo.
  10. :novar
  11. echo        Usage: INSTALL EDITOR FILE [PARAMETERS]
  12. echo.
  13. echo       EDITOR: Your favorite text editor
  14. echo         FILE: Your daily maintenance batch file
  15. echo   PARAMETERS: Parameters for SILT (Optional)
  16. echo.
  17. echo      eg. INSTALL C:\Q.EXE C:\FRONT.BAT -y
  18. echo.
  19. goto out
  20. :run
  21. echo     Maximus Directory:  \MAX
  22. ECHO           Text Editor:  %1
  23. ECHO      Daily Batch File:  %2
  24. if (%3)==() echo   Parameters for SILT:  none
  25. if not (%3)==() echo   Parameters for SILT:  %3 %4 %5 %6 %7 %8
  26. ECHO.
  27. IF EXIST %1 GOTO FOUNDED
  28. echo `%1' not found!  Please use full PATH\FILENAME.
  29. GOTO OUT
  30. :FOUNDED
  31. IF EXIST %2 GOTO FOUNDBAT
  32. echo `%2' not found! Please use full PATH\FILENAME.
  33. GOTO OUT
  34. :foundBAT
  35. ver |find "DOS Version 6">nul
  36. if errorlevel 1 echo.
  37. if errorlevel 1 echo. Requires DOS v6.x
  38. if errorlevel 1 goto out
  39. echo    Confirmed DOS 6.x
  40. onpath find.exe
  41. if errorlevel 5 GOTO NOFIND
  42. if errorlevel 2 GOTO FOUNDFIND
  43. :NOFIND
  44. echo Can't locate `FIND.EXE' on your PATH.
  45. goto out
  46. :FOUNDFIND
  47. echo    Located FIND.EXE
  48. onpath MOVE.exe
  49. if errorlevel 5 GOTO NOMOVE
  50. if errorlevel 2 GOTO FOUNDMOVE
  51. :NOMOVE
  52. echo Can't locate `MOVE.EXE' on your PATH.
  53. goto out
  54. :FOUNDMOVE
  55. Echo    Located MOVE.EXE
  56. onpath pkunzip.exe
  57. if errorlevel 5 GOTO NOpk
  58. if errorlevel 2 GOTO FOUNDpk
  59. :NOPK
  60. echo Can't locate `PKUNZIP.EXE' on your PATH.
  61. goto out
  62. :FOUNDPK
  63. echo    Located PKUNZIP.EXE 
  64. echo.
  65. if exist alf.zip goto havezip
  66. echo Can't locate `ALF.ZIP' in current directory.
  67. goto out
  68. :havezip
  69. onpath choice.exe
  70. if errorlevel 3 goto nochoice
  71. Choice Continue?C
  72. if errorlevel 2 goto out
  73. if errorlevel 1 goto go
  74. :nochoice
  75. echo If INCORRECT, hit CTRL-BREAK now!
  76. echo.
  77. pause
  78. :GO
  79. CLS
  80. echo.
  81. echo   ───────────────────────── INSTALL for ALF v2.0wb ─────────────────────────  
  82. echo.
  83. echo.
  84. echo A) INSTALL will now create a directory called \MAX\ALF\ and extract ALF.ZIP
  85. echo    into it. `Support' programs will be moved to the \MAX directory, and ALF
  86. echo    will be configured to use %1 for text editing.
  87. echo.
  88. echo B) You will then be required to add some lines of text to three different
  89. echo    files. You'll be shown the line that must be added, then the editor will
  90. echo    load the file. A pen and paper could be handy, and remember to SAVE the
  91. echo    files. MECCA and SILT will both run automatically during the installation.
  92. echo.
  93. echo C) Four more files will be loaded into the editor so that you can read them
  94. echo    and edit them if desired. You'll also be asked to edit your AUTOEXEC.BAT
  95. echo    file if it doesn't already include a COMSPEC statement.
  96. echo.
  97. echo D) And finally, you'll have the option of installing some remote features.
  98. echo.
  99. onpath choice.exe
  100. if errorlevel 3 goto noch
  101. Choice Continue?C
  102. if errorlevel 2 goto out
  103. if errorlevel 1 goto 2go
  104. :noch
  105. echo To Quit, hit CTRL-BREAK now!
  106. echo.
  107. pause
  108. :2GO
  109. md \MAX\ALF
  110. if exist \max\alf\nul goto havealf
  111. echo ERROR creating \MAX\ALF\ directory!
  112. goto out
  113. :havealf
  114. echo 
  115. pkunzip alf.ZIP \MAX\ALF
  116. copy onpath.exe \max\alf>nul
  117. cd \MAX\alf
  118. ECHO C%1 %%J>ALF.EDR
  119. pkunzip *.zip \MAX
  120. move touch.com \max
  121. del *.zip
  122. :nomec
  123. cls
  124. echo.
  125. echo Editing WELCOME.MEC (optional)                                       1/7 
  126. echo.
  127. echo If files are waiting to be hurled, you can be alerted at logon.
  128. echo Add the following line for logon alerts:
  129. echo.
  130. echo  [link]alf\alfcheck.bbs
  131. echo.
  132. pause
  133. %1 \MAX\MISC\WELCOME.MEC
  134. find /I "[link]alf\alfcheck.bbs" \max\misc\welcome.mec>nul
  135. if errorlevel 1 onpath.exe choice.exe
  136. if errorlevel 3 cls
  137. if errorlevel 3 Echo Logon alert not installed.
  138. if errorlevel 3 goto ctl
  139. if errorlevel 1 CHOICE You'll skip the logon alert, correct?C
  140. if errorlevel 2 goto nomec
  141. if errorlevel 1 cls
  142. if errorlevel 1 goto ctl
  143. echo 
  144. cls
  145. \max\MECCA \max\MISC\WELCOME.MEC
  146. echo.
  147. :ctl
  148. echo.
  149. echo Editing MENUS.CTL (required)                                         2/7 
  150. echo.
  151. echo To the FILES MENU, add the following line:
  152. echo.
  153. echo  Display_File           misc\alf             SysOp "\ALF"
  154. echo.
  155. pause
  156. %1 \max\menus.ctl
  157. find /I "alf\alf" \max\menus.ctl>nul
  158. if errorlevel 1 goto ctl
  159. cd \max
  160. cls
  161. echo SILT MAX %3 %4 %5 %6 %7 %8 
  162. Silt Max %3 %4 %5 %6 %7 %8
  163. :nobat
  164. echo.
  165. echo Editing %2 (required)
  166. echo                                                                     A 3/7 
  167. echo.
  168. echo Add the following line so that it runs ONE time per day:
  169. ECHO.
  170. ECHO call \max\alf\alfday.bat
  171. ECHO.
  172. PAUSE
  173. %1 %2
  174. find /I "call \max\alf\alfday.bat" %2 >nul
  175. if errorlevel 1 goto nobat
  176. cls
  177. echo.
  178. echo Editing ALFSORT.BAT (optional)                                       4/7 
  179. echo.
  180. echo Edit this file to choose FILES.BBS sorting methods.
  181. echo.
  182. pause
  183. %1 \max\alf\alfsort.bat
  184. cls
  185. echo.
  186. echo Editing ALFCESS.BAT (optional)                                       5/7 
  187. echo.
  188. echo This file runs VIRCHECK.BAT and/or other programs when you process files.
  189. echo Read installation info and make required changes.
  190. echo.
  191. pause
  192. %1 \max\alf\alfcess.bat
  193. cls
  194. echo.
  195. echo Editing ALFPOST.BAT (optional)                                       6/7 
  196. echo.
  197. echo This file runs only if a FILES.BBS entry is found after processing a file.
  198. echo Make changes as desired.
  199. echo.
  200. pause
  201. %1 \max\alf\alfpost.bat
  202. cls
  203. echo.
  204. echo Editing ALFXTRN.MEC (optional)                                       7/7 
  205. echo.
  206. echo Runs an external program either during processing or from the main menu.
  207. echo Read installation info and make required changes.
  208. ECHO.
  209. PAUSE
  210. %1 \MAX\alf\ALFXTRN.MEC
  211. ECHO 
  212. cls
  213. \max\MECCA \max\alf\ALFXTRN.MEC
  214. echo.
  215. find /I "SET COMSPEC=" \autoexec.bat>nul
  216. if errorlevel 1 goto auto
  217. goto noauto
  218. :auto
  219. cls
  220. echo.
  221. echo COMSPEC not found in Autoexec.bat! (required)
  222. echo.
  223. echo Add the following line to AUTOEXEC.BAT:
  224. echo.
  225. echo SET COMSPEC=C:\COMMAND.COM (Change drive letter if required)
  226. echo.
  227. pause
  228. %1 \AUTOEXEC.BAT
  229. find /I "SET COMSPEC=" \autoexec.bat>nul
  230. if errorlevel 1 goto auto
  231. echo.
  232. echo You should reboot for the change to take effect.
  233. echo ALF uses this variable for the Dos shell menu option.
  234. echo.
  235. pause
  236. :noauto
  237. echo.
  238. echo REMOTE use of the text EDITOR and file SELECTOR requires DOORWAY.EXE.
  239. echo.
  240. echo To implement the remote editor and file selector, edit ALFDORED.MEC,
  241. echo ALFDORPK.MEC and ALFDIMPK.MEC. You can do this at any time.
  242. echo.
  243. \max\alf\onpath choice.exe
  244. if errorlevel 3 goto nocho
  245. Choice Edit these files now?C
  246. if errorlevel 2 del \max\alf\onpath.exe
  247. if errorlevel 2 goto notnow
  248. if errorlevel 1 goto inst
  249. :nocho
  250. del \max\alf\onpath.exe
  251. echo  ALF is now installed.
  252. echo.
  253. echo  To edit the remote files now, press a key.
  254. echo.
  255. echo  Hit CTRL-BREAK to skip them!
  256. echo.
  257. pause
  258. :goto nobrk
  259. :inst
  260. del \max\alf\onpath.exe
  261. :nobrk
  262. cls
  263. echo.
  264. echo Editing ALFDORED.MEC (optional)                                      1/3 
  265. echo.
  266. echo Allows you to run your editor and edit FILES.BBS files from remote.
  267. echo Read installation info and make required changes.
  268. ECHO.
  269. PAUSE
  270. %1 \MAX\alf\ALFDORED.MEC
  271. ECHO 
  272. cls
  273. \max\MECCA \max\alf\ALFDORED.MEC
  274. echo.
  275. echo Editing ALFDORPK.MEC (optional)                                      2/3 
  276. echo.
  277. echo Allows remote use of file selector.
  278. echo Read installation info and make required changes.
  279. ECHO.
  280. PAUSE
  281. %1 \MAX\alf\ALFDORPK.MEC
  282. ECHO 
  283. cls
  284. \max\MECCA \max\alf\ALFDORPK.MEC
  285. echo.
  286. echo Editing ALFDIMPK.MEC (optional)                                      3/3 
  287. echo.
  288. echo Allows remote use of file selector when importing files.
  289. echo Read installation info and make required changes.
  290. ECHO.
  291. PAUSE
  292. %1 \MAX\alf\ALFDIMPK.MEC
  293. ECHO 
  294. cls
  295. \max\MECCA \max\alf\ALFDIMPK.MEC
  296. :notnow
  297. echo.
  298. echo ALF is installed!
  299. echo.
  300. echo Run Maximus, go to the files menu and select ALF.
  301. :out
  302. echo 
  303.