Cessna PC Utilities (V00509)




                                    PC_LOGOFF
                                  Dale D. Lutes
                             Cessna Aircraft Company
                                 Wichita, Kansas


          1.0  DESCRIPTION 

          This  program  works  with  LOGOFF.BAT to disconnect network
          devices and, in effect, log the PC user off of the server.  


          2.0  INSTALLATION 


               1.  Execute the command procedure INSTALL_LOGOFF.COM on
                   the server.  This procedure creates a new  applica-
                   tion  disk  service  named  PC_APPLICATIONS, copies
                   LOGOFF.BAT and LOGOFF.EXE into it,  and  mounts  it
                   permanently with no connection limit.  

               2.  Add the following lines to your AUTOUSER.BAT(s):  
                   
                   :cAPP
                   USE ?: \\TDS3\PC_APPLICATIONS /VIRTUAL /LOG
                   /ENV=_APP
                   if not errorlevel 1 goto cAPPok
                   echo ? Cannot connect to service PC_APPLICATIONS
                   pause
                   goto cAPPdone
                   :cAPPok
                   PATH %PATH%;%_APP%\
                   :cAPPdone

                   The file SAMPLE_AUTOUSER.BAT provides an example.  


          3.0  USAGE 

          The  following  example shows how LOGOFF is invoked from the
          PC:  
          
          M:\>LOGOFF
          
          M:\>echo off
          Error: Device LPT3: is not connected
          
          Batch file missing
          
          C:\>

          There  are two error messages shown in the example.  Both of
          these are normal.  The first occurs because LPT3  was  never
          connected to a print service.  The "Batch file missing" mes-
          sage is displayed when the  PC_APPLICATIONS  service  (which
          contains LOGOFF.BAT) is disconnected.  




          PC_LOGOFF                                             Page 2
          


          4.0  HOW IT WORKS 


          LOGOFF.BAT builds two files:  
          
          LOGOFF1.TMP contains the output from the USE command.
          LOGOFF2.TMP contains the current DOS path.

          This  program  uses the first file to identify which network
          file and disk services are to be disconnected.  

          It constructs a new path that does not include references to
          the targeted services.  

          It  writes  the updated path statement and the necessary USE
          /DISCONNECT commands to the file LOGOTMP.BAT.  

          LOGOFF.BAT  calls LOGOTMP.BAT then performs a few additional
          disconnects.  


          5.0  NOTES 


               1.  LOGOFF.FOR  was  compiled and linked with Microsoft
                   FORTRAN version 4.1.  

               2.  LOGOFF.FOR  assumes that the software is located on
                   the  PC_APPLICATIONS  service.   If  you  load  the
                   software  on  a disk service with a different name,
                   you must change the line in the source which reads: 
                   
                        IF (SERVICE .EQ. 'PC_APPLI') THEN

                   then   re-compile.   Actually,  only  the  first  8
                   characters are  checked,  so  naming  your  service
                   PC_APPLIC  is  OK.  However, defining two services,
                   PC_APPLIC_1 and PC_APPLIC_2 would be a no-no.  

               3.  LOGOFF.BAT  and  AUTOUSER.BAT  assume  that the en-
                   vironment   variable    _APP    points    to    the
                   PC_APPLICATIONS service.  If you want to use a dif-
                   ferent variable name, be sure to make  the  changes
                   in both of these files.  


Click on FTP to download from the FTP archives.
[FTP]