home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / EXTRAS / UUCODE / UUPC / TEST / UPC12ES4.ZIP / SCRIPTS / su.bat < prev    next >
Encoding:
DOS Batch File  |  1993-10-31  |  4.6 KB  |  90 lines

  1. @echo off
  2. REM *------------------------------------------------------------------*
  3. REM *   Program:        su.bat          03 Nov 1990                    *
  4. REM *   Author:         Andrew H. Derbyshire                           *
  5. REM *   Address:        help@kendra.kew.com                            *
  6. REM *   Function:       Demonstration of multiple user support         *
  7. REM *                   with UUPC/extended                             *
  8. REM *------------------------------------------------------------------*
  9.  
  10. REM *------------------------------------------------------------------*
  11. REM *    Changes Copyright (c) 1989-1993 by Kendra Electronic         **
  12. REM *    Wonderworks.                                                 **
  13. REM *                                                                 **
  14. REM *    All rights reserved except those explicitly granted by       **
  15. REM *    the UUPC/extended license agreement.                         **
  16. REM *------------------------------------------------------------------*
  17.  
  18. REM *   $Id: su.bat 1.2 1993/10/31 18:49:58 ahd Exp $
  19. REM *
  20. REM *   $Log: su.bat $
  21. REM *   Revision 1.2  1993/10/31  18:49:58  ahd
  22. REM *   Note requirement for PASSWD file entry
  23. REM *
  24.  
  25. REM *--------------------------------------------------------------*
  26. REM *  This command file provides a simple example of changing the *
  27. REM *  active user id (the user id used when sending mail) in      *
  28. REM *  UUPC/extended.  It assumes:                                 *
  29. REM *                                                              *
  30. REM *  1) The configuration directory is C:\LIB\UUPC,              *
  31. REM *                                                              *
  32. REM *  2) That each user has a PERSONAL.RC file under under his    *
  33. REM *     under own name in the configuration directory.  The      *
  34. REM *     user also normally needs a PASSWD file entry as well.    *
  35. REM *                                                              *
  36. REM *  3) The MS-DOS environment has enough space free to save an  *
  37. REM *     extra copy of the DOS prompt and the current UUPCUSRC    *
  38. REM *     variable.                                                *
  39. REM *                                                              *
  40. REM *  4) A copy of COMMAND.COM can be invoked via the COMSPEC     *
  41. REM *     variable.                                                *
  42. REM *--------------------------------------------------------------*
  43. REM *       If the user didn't invoke us properly, give help       *
  44. REM *--------------------------------------------------------------*
  45. if not "%1" == ""   goto ok
  46. echo Syntax:   %0 userid command
  47. echo The command is optional; if not specified, a sub-shell will be
  48. echo invoked.  An example:
  49. echo           %0 postmast mail
  50. goto quit
  51. REM *--------------------------------------------------------------*
  52. REM *                Save the current environment                  *
  53. REM *--------------------------------------------------------------*
  54. :ok
  55. SET UUPCPRMPT=%prompt%
  56. SET UUPCUSRRX=%UUPCUSRRC%
  57. REM *------------------------------------------------------------------*
  58. REM *   Change the following line if your UUPC PERSONAL.RC files       *
  59. REM *                    aren't in C:\uupc                         *
  60. REM *------------------------------------------------------------------*
  61. SET UUPCUSRRC=\uupc\%1.rc
  62. REM *------------------------------------------------------------------*
  63. REM *                    Verify the file exists                        *
  64. REM *------------------------------------------------------------------*
  65. if not exist %UUPCUSRRC% goto error
  66. PROMPT Enter EXIT to logout from %1$_%UUPCPRMPT%
  67. REM *------------------------------------------------------------------*
  68. REM *            Run a sub-shell with the new variables                *
  69. REM *------------------------------------------------------------------*
  70. if "%2" == "" goto shell
  71. %2 %3 %4 %5 %6 %7 %8 %9
  72. goto exit
  73. :shell
  74. %comspec%
  75. goto exit
  76. REM *------------------------------------------------------------------*
  77. REM *             Come here to issue an error message                  *
  78. REM *------------------------------------------------------------------*
  79. :error
  80. echo %UUPCUSRRC% doesn't exist!  Please verify %1 is a valid user.
  81. REM *------------------------------------------------------------------*
  82. REM *                   Reset variables and exit                       *
  83. REM *------------------------------------------------------------------*
  84. :exit
  85. PROMPT %UUPCPRMPT%
  86. SET UUPCUSRRC=%UUPCUSRRX%
  87. SET UUPCPRMPT=
  88. SET UUPCUSRRX=
  89. :quit
  90.