                              
                              
                          CD Mount
                              
                              
                              
                   CD-ROM Mounting System
                             for
                     RemoteAccess BBS v2
                              
                              
                              
                              
                              
                              
                              
                              
                              
                              
                    Cabell B. Clarke Jr.
                    The Boot Factory BBS
                      FidoNet 1:264/19
                     DATA: 804-262-9289
                              
                              
                              
                              
                              
     ------------
     >>Foreword<<
     ------------
     This  story  begins with The Boot Factory  BBS  running
     RemoteAccess v1.11.  When I purchased a CD-ROM  for  my
     BBS,  I  searched for a program or door to  manage  the
     file  areas and such so that I could run multiple  CD's
     on  one  drive, and still only have the users  see  the
     files   on  the  currently  mounted  CD-ROM  disk.    I
     evaluated  several nice programs for this  purpose  and
     was  on  the verge of purchasing one when Andrew Milner
     released  RemoteAccess v2 with built-in CD-ROM support.
     I  realized  that  with a few little programs  I  could
     almost completely automate the mounting/dismounting  of
     the  different disks.  I wrote a few programs to manage
     the tough stuff and automated the running of them via a
     simple batch file.
     
     I  also found myself telling a LOT of people how to  do
     this  setup,  so  I  thought I would share  the  entire
     concept  with the rest of the RemoteAccess BBS world  -
     hence this document and accompanying files were born.
     
     --------------
     >>Disclaimer<<
     --------------
     Basically  this  system  works  extremely  well  on  my
     system, but it is not guaranteed to do anything on your
     system.   Cabell Clarke or The Boot Factory BBS  assume
     no  responsibility for this document.  You are on  your
     own.
     
     --------------
     >>Principles<<
     --------------
     The  problem  was "How do I keep users from  trying  to
     download files from the CD's which were not in the  CD-
     ROM  drive?"  It was immediately apparent that I needed
     a  way of only letting them have access to the stuff in
     the  drive.  In order to set up a single CD system with
     multiple  CD's,  I determined that I needed  to  use  a
     combination of File Groups, Areas, and Flags to control
     access to the different CD's.
     
     This system uses 2 programs written in Turbo Pascal  7,
     AGSET.EXE  and FLAG.EXE  which are part of  my  R_Utils
     package  and  a controlling batch file, MOUNT.BAT.   It
     requires that you set your files groups and areas up in
     a  specific way in order for it to work.  This document
     will  describe how I set my system up.  You can  either
     set  yours  up identically, or similarly,  or  use  the
     system  as  you  see fit as long as you understand  the
     principles behind it.
     
     This  document assumes you already know how to get your
     CD-ROM file descriptions into the RA File Database,  so
     we  will  not  cover that here.  The steps  below  will
     outline  exactly what I did and hopefully show you  how
     to do the same thing or something similar.
     

     -------------
     >>Procedure<<
     -------------
     The first step is to assign a unique File Group to each
     CD  in  my  collection.  For example  I  assigned  File
     Groups 1, 2 and 3 to "Shareware '93" Volumes 1, 2,  and
     3  ( 3 CD's in this collection).  I assigned group 4 to
     "All the files on my Hard Disk", and Group 5 to the  CD
     "OffWall Files Vol. 5".
     
     The   next  step  is  to  assign  a  unique   Flag   in
     RemoteAccess to each disk.  I have reserved all of  the
     'C' flags for my CDs.  As above, the "Shareware 93" and
     "Offwall" CD's are assigned in this order:
     
     CD        Flag
     Volume 1  C1
     Volume 2  C2
     Volume 3  C3
     Hard Disk      C4
     OffWall   C5
     
     The  final system setup step is to edit each File group
     and  Area,  so  that the assigned flags are  associated
     with  the  File  Group for that CD and the  File  areas
     found  on  that  CD.  All of the areas associated  with
     Volume  1  above would have their List and Download  C1
     flags set to X (ON). I also set my C1 flag for the File
     Group associated with Volume 1 although you do NOT need
     to use file groups at all if you don't want to.
     
     As  you  will  notice, I can only do 8 CD's  using  the
     method  I have outlined here.  If you want to go  to  a
     little  more trouble and set up access bit  MASKS  with
     your flags, you should be able to mount 255 CD's with 8
     flags  (minus 1 for your hard disk areas - 254  maybe).
     Someone  correct me if that number is wrong. I  haven't
     actually tried it but I'm sure it would work.
     
     -------------
     >>Mount.Bat<<
     -------------
     Finally the Mount.Bat file which automates the mounting
     and dismounting of the CD's.  Here it is:
     
     @Echo Off
     if z%1 == z   goto Syntax
     if z%2 == z   goto Syntax
     agset fg4 fa1
     Flag %1 On
     Flag %2 Off
     Goto Xit
     :Syntax
     cls
     Echo SYNTAX: Mount [OnFlag] [OffFlag]
     :Xit
     
     Let's look at each line individually:
     
     @Echo Off
          Let's turn off screen echo first for cleanliness.
     
     
     if z%1 == z   goto Syntax
     if z%2 == z   goto Syntax
           These two lines simply check for existence of two
     parameters.
     
     agset fg4 fa1
           This  line  runs the AGSet program  which  resets
     every  users  default file area and group to  one  that
     always  exists  on your system - in this  case  it  was
     group 4 and area 1 which reside on my hard disk.
     
     Flag %1 On
     Flag %2 Off
          Finally, the meat and potatoes. We set the flag ON
     (X)  (mount) using the first command line parameter and
     the  flag OFF (-) (dismount) using the second parameter
     for ALL users.
     
     :Syntax
     cls
     Echo SYNTAX: Mount [OnFlag] [OffFlag]
     :Xit
           And  lastly  we finish up cleanly with  a  SYNTAX
     display if necessary.
     
     Plug  in the CD that was associated with the Mount flag
     (1st  parameter) and away you go. When you remove  that
     CD  and  plug  in  another simply run  Mount.Bat  again
     feeding  it the appropriate parameters to dismount  the
     current one and mount the new one.
     
     ----------
     >>Thanks<<
     ----------
     I  hope  you  find this method useful.  I  do.   Please
     consider  registering my R_Utils programs  for  use  on
     your system.
     
     Cabell B. Clarke Jr.
     5513 Cottage St.
     Richmond VA  23228
     
     The Boot Factory BBS
     804-262-9289
     1200-28800bps USR HST  v32 terbo v34 8N1
     1:264/19@fidonet.org
     Compuserve 74740,1370
     
     
