home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / WW4SHARE / WWIV430.ZIP / WWIVBAT.SAM < prev    next >
Text File  |  2000-03-06  |  3KB  |  75 lines

  1. @ECHO OFF
  2. REM *****  Sample batch file for running the BBS on Instance 1:
  3.  
  4. REM ***** First, set the environment variable for the instance:
  5. SET WWIV_INSTANCE=1
  6.  
  7.  
  8. REM ***** Change drive and directory to the location of the BBS 
  9. d:
  10. cd \bbs
  11.  
  12. REM ***** Looping the BBS to include a reload of the fossil driver is 
  13. REM ***** recommended after every user.
  14.  
  15. :LOOP
  16. REM ***** Load the fossil driver in the begining of the loop.  
  17. REM ***** X00 or BNU work fine in DOS or a DOS box.
  18. REM ***** WinFossil or ADF will work well for Windows.
  19. REM ***** X00 commandlines are used for an example.  You will have 
  20. REM ***** to adjust these for your system.
  21. REM ***** Setting of TX/RX buffers is NOT recommended for any fossil
  22. REM ***** driver.  Allow the fossil to set them to the defaults.
  23. REM 
  24. REM X00.EXE E B,1,115200
  25. REM    │    │ │ │   │
  26. REM    │    │ │ │   └─── rate of your com port
  27. REM    │    │ │ └─────── com port -1 COM1=0 COM2=1 ect...
  28. REM    │    │ └───────── baud settings 
  29. REM    │    └─────────── Eliminates the X00 info splash
  30. REM    └──────────────── X00 of course.  Must be in the BBS dir or path
  31. REM
  32. REM  Next call XU.EXE, the runtime interface for X00.  It has to be
  33. REM  called twice, once to turn the port on, again to lock the port.
  34. REM
  35. REM XU.EXE PORT:<x>:<ON | OFF>
  36. REM   │     │    │      │
  37. REM   │     │    │      └─────  turns port ON or OFF
  38. REM   │     │    └────────────  com port -1 COM1=0 COM2=1 ect...
  39. REM   │     └─────────────────  addresses command to the port
  40. REM   ├───────────────────────  interface program for X00 while active
  41. REM   │     ┌─────────────────  locks baud rate of port
  42. REM   │     │    ┌────────────  com port -1 COM1=0 COM2=1 ect...
  43. REM   │     │    │    ┌───────  baud rate to lock port at
  44. REM   │     │    │    │     ┌─  sets parity on port
  45. REM   │     │    │    │     │
  46. REM XU.EXE LOCK:<x>:<baud>:8N1
  47.  
  48. X00.EXE E B,1,115200 
  49. XU.EXE PORT:1:ON
  50. XU.EXE LOCK:1:115200:8N1
  51.  
  52. REM ***** Load the BBS  -o  = Exit after one user
  53. REM *****               -n0 = Error level 0 on normal exit
  54. REM *****               -a2 = Error level 2 on abnormal exit
  55. REM *****                %x = Allows passing of other parameters on the 
  56. REM *****                     commandline ( i.e.  WWIV -m )
  57.  
  58. bbs.exe -o -n0 -a3 %1 %2 %3
  59. REM ***** If the BBS exits abnormally goto the specified label. 
  60. if errorlevel 3 goto ABNORMALEND  
  61. REM ***** Errorlevel 2 is a normal quit or escape from the BBS  
  62. if errorlevel 2 goto END  
  63.  
  64. REM ***** Otherwise, turn of and unload the fossil driver
  65. XU PORT:1:OFF
  66. X00.EXE
  67. REM ***** And go back to the top of the loop to reload.
  68. goto LOOP
  69.  
  70. REM ***** Actions to be performed if the BBS exits abnormally
  71. :ABNORMALEND
  72.  
  73. REM ***** Nothing goes below this label
  74. :END
  75.