home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / BBSDOOR2.ARJ / RUTIL100.ZIP / CDMNT.TXT next >
Encoding:
Text File  |  1994-12-16  |  7.5 KB  |  202 lines

  1.                               
  2.                               
  3.                           CD Mount
  4.                               
  5.                               
  6.                               
  7.                    CD-ROM Mounting System
  8.                              for
  9.                      RemoteAccess BBS v2
  10.                               
  11.                               
  12.                               
  13.                               
  14.                               
  15.                               
  16.                               
  17.                               
  18.                               
  19.                               
  20.                     Cabell B. Clarke Jr.
  21.                     The Boot Factory BBS
  22.                       FidoNet 1:264/19
  23.                      DATA: 804-262-9289
  24.                               
  25.                               
  26.                               
  27.                               
  28.                               
  29.      ------------
  30.      >>Foreword<<
  31.      ------------
  32.      This  story  begins with The Boot Factory  BBS  running
  33.      RemoteAccess v1.11.  When I purchased a CD-ROM  for  my
  34.      BBS,  I  searched for a program or door to  manage  the
  35.      file  areas and such so that I could run multiple  CD's
  36.      on  one  drive, and still only have the users  see  the
  37.      files   on  the  currently  mounted  CD-ROM  disk.    I
  38.      evaluated  several nice programs for this  purpose  and
  39.      was  on  the verge of purchasing one when Andrew Milner
  40.      released  RemoteAccess v2 with built-in CD-ROM support.
  41.      I  realized  that  with a few little programs  I  could
  42.      almost completely automate the mounting/dismounting  of
  43.      the  different disks.  I wrote a few programs to manage
  44.      the tough stuff and automated the running of them via a
  45.      simple batch file.
  46.      
  47.      I  also found myself telling a LOT of people how to  do
  48.      this  setup,  so  I  thought I would share  the  entire
  49.      concept  with the rest of the RemoteAccess BBS world  -
  50.      hence this document and accompanying files were born.
  51.      
  52.      --------------
  53.      >>Disclaimer<<
  54.      --------------
  55.      Basically  this  system  works  extremely  well  on  my
  56.      system, but it is not guaranteed to do anything on your
  57.      system.   Cabell Clarke or The Boot Factory BBS  assume
  58.      no  responsibility for this document.  You are on  your
  59.      own.
  60.      
  61.      --------------
  62.      >>Principles<<
  63.      --------------
  64.      The  problem  was "How do I keep users from  trying  to
  65.      download files from the CD's which were not in the  CD-
  66.      ROM  drive?"  It was immediately apparent that I needed
  67.      a  way of only letting them have access to the stuff in
  68.      the  drive.  In order to set up a single CD system with
  69.      multiple  CD's,  I determined that I needed  to  use  a
  70.      combination of File Groups, Areas, and Flags to control
  71.      access to the different CD's.
  72.      
  73.      This system uses 2 programs written in Turbo Pascal  7,
  74.      AGSET.EXE  and FLAG.EXE  which are part of  my  R_Utils
  75.      package  and  a controlling batch file, MOUNT.BAT.   It
  76.      requires that you set your files groups and areas up in
  77.      a  specific way in order for it to work.  This document
  78.      will  describe how I set my system up.  You can  either
  79.      set  yours  up identically, or similarly,  or  use  the
  80.      system  as  you  see fit as long as you understand  the
  81.      principles behind it.
  82.      
  83.      This  document assumes you already know how to get your
  84.      CD-ROM file descriptions into the RA File Database,  so
  85.      we  will  not  cover that here.  The steps  below  will
  86.      outline  exactly what I did and hopefully show you  how
  87.      to do the same thing or something similar.
  88.      
  89.  
  90.      -------------
  91.      >>Procedure<<
  92.      -------------
  93.      The first step is to assign a unique File Group to each
  94.      CD  in  my  collection.  For example  I  assigned  File
  95.      Groups 1, 2 and 3 to "Shareware '93" Volumes 1, 2,  and
  96.      3  ( 3 CD's in this collection).  I assigned group 4 to
  97.      "All the files on my Hard Disk", and Group 5 to the  CD
  98.      "OffWall Files Vol. 5".
  99.      
  100.      The   next  step  is  to  assign  a  unique   Flag   in
  101.      RemoteAccess to each disk.  I have reserved all of  the
  102.      'C' flags for my CDs.  As above, the "Shareware 93" and
  103.      "Offwall" CD's are assigned in this order:
  104.      
  105.      CD        Flag
  106.      Volume 1  C1
  107.      Volume 2  C2
  108.      Volume 3  C3
  109.      Hard Disk      C4
  110.      OffWall   C5
  111.      
  112.      The  final system setup step is to edit each File group
  113.      and  Area,  so  that the assigned flags are  associated
  114.      with  the  File  Group for that CD and the  File  areas
  115.      found  on  that  CD.  All of the areas associated  with
  116.      Volume  1  above would have their List and Download  C1
  117.      flags set to X (ON). I also set my C1 flag for the File
  118.      Group associated with Volume 1 although you do NOT need
  119.      to use file groups at all if you don't want to.
  120.      
  121.      As  you  will  notice, I can only do 8 CD's  using  the
  122.      method  I have outlined here.  If you want to go  to  a
  123.      little  more trouble and set up access bit  MASKS  with
  124.      your flags, you should be able to mount 255 CD's with 8
  125.      flags  (minus 1 for your hard disk areas - 254  maybe).
  126.      Someone  correct me if that number is wrong. I  haven't
  127.      actually tried it but I'm sure it would work.
  128.      
  129.      -------------
  130.      >>Mount.Bat<<
  131.      -------------
  132.      Finally the Mount.Bat file which automates the mounting
  133.      and dismounting of the CD's.  Here it is:
  134.      
  135.      @Echo Off
  136.      if z%1 == z   goto Syntax
  137.      if z%2 == z   goto Syntax
  138.      agset fg4 fa1
  139.      Flag %1 On
  140.      Flag %2 Off
  141.      Goto Xit
  142.      :Syntax
  143.      cls
  144.      Echo SYNTAX: Mount [OnFlag] [OffFlag]
  145.      :Xit
  146.      
  147.      Let's look at each line individually:
  148.      
  149.      @Echo Off
  150.           Let's turn off screen echo first for cleanliness.
  151.      
  152.      
  153.      if z%1 == z   goto Syntax
  154.      if z%2 == z   goto Syntax
  155.            These two lines simply check for existence of two
  156.      parameters.
  157.      
  158.      agset fg4 fa1
  159.            This  line  runs the AGSet program  which  resets
  160.      every  users  default file area and group to  one  that
  161.      always  exists  on your system - in this  case  it  was
  162.      group 4 and area 1 which reside on my hard disk.
  163.      
  164.      Flag %1 On
  165.      Flag %2 Off
  166.           Finally, the meat and potatoes. We set the flag ON
  167.      (X)  (mount) using the first command line parameter and
  168.      the  flag OFF (-) (dismount) using the second parameter
  169.      for ALL users.
  170.      
  171.      :Syntax
  172.      cls
  173.      Echo SYNTAX: Mount [OnFlag] [OffFlag]
  174.      :Xit
  175.            And  lastly  we finish up cleanly with  a  SYNTAX
  176.      display if necessary.
  177.      
  178.      Plug  in the CD that was associated with the Mount flag
  179.      (1st  parameter) and away you go. When you remove  that
  180.      CD  and  plug  in  another simply run  Mount.Bat  again
  181.      feeding  it the appropriate parameters to dismount  the
  182.      current one and mount the new one.
  183.      
  184.      ----------
  185.      >>Thanks<<
  186.      ----------
  187.      I  hope  you  find this method useful.  I  do.   Please
  188.      consider  registering my R_Utils programs  for  use  on
  189.      your system.
  190.      
  191.      Cabell B. Clarke Jr.
  192.      5513 Cottage St.
  193.      Richmond VA  23228
  194.      
  195.      The Boot Factory BBS
  196.      804-262-9289
  197.      1200-28800bps USR HST  v32 terbo v34 8N1
  198.      1:264/19@fidonet.org
  199.      Compuserve 74740,1370
  200.      
  201.      
  202.