home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / NETWORK / UUPC11QD.ZIP / SU.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-11-04  |  3.7 KB  |  69 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. REM *  This command file provides a simple example of changing the *
  10. REM *  active user id (the user id used when sending mail) in      *
  11. REM *  UUPC/extended.  It assumes:                                 *
  12. REM *                                                              *
  13. REM *  1) The configuration directory is C:\LIB\UUPC,              *
  14. REM *                                                              *
  15. REM *  2) That each user has a PERSONAL.RC file under under his    *
  16. REM *     under own name in the configuration directory.           *
  17. REM *                                                              *
  18. REM *  3) The MS-DOS environment has enough space free to save an  *
  19. REM *     extra copy of the DOS prompt and the current UUPCUSRC    *
  20. REM *     variable.                                                *
  21. REM *                                                              *
  22. REM *  4) A copy of COMMAND.COM can be invoked via the COMSPEC     *
  23. REM *     variable.                                                *
  24. REM *--------------------------------------------------------------*
  25. REM *       If the user didn't invoke us properly, give help       *
  26. REM *--------------------------------------------------------------*
  27. if not "%1" == ""   goto ok
  28. echo Syntax:   %0 userid command
  29. echo The command is optional; if not specified, a sub-shell will be
  30. echo invoked.  An example:
  31. echo           %0 postmast mail
  32. goto quit
  33. REM *--------------------------------------------------------------*
  34. REM *                Save the current environment                  *
  35. REM *--------------------------------------------------------------*
  36. :ok
  37. SET UUPCPRMPT=%prompt%
  38. SET UUPCUSRRX=%UUPCUSRRC%
  39. REM *------------------------------------------------------------------*
  40. REM *   Change the following line if your UUPC PERSONAL.RC files       *
  41. REM *                    aren't in C:\lib\uupc                         *
  42. REM *------------------------------------------------------------------*
  43. SET UUPCUSRRC=c:\lib\uupc\%1.rc
  44. REM *------------------------------------------------------------------*
  45. REM *                    Verify the file exists                        *
  46. REM *------------------------------------------------------------------*
  47. if not exist %UUPCUSRRC% goto error
  48. PROMPT Enter EXIT to logout from %1$_%UUPCPRMPT%
  49. REM *------------------------------------------------------------------*
  50. REM *            Run a sub-shell with the new variables                *
  51. REM *------------------------------------------------------------------*
  52. if "%2" == "" %comspec%
  53. if not "%2" == "" %2 %3 %4 %5 %6 %7 %8 %9
  54. goto exit
  55. REM *------------------------------------------------------------------*
  56. REM *             Come here to issue an error message                  *
  57. REM *------------------------------------------------------------------*
  58. :error
  59. echo %UUPCUSRRC% doesn't exist!  Please verify %1 is a valid user.
  60. REM *------------------------------------------------------------------*
  61. REM *                   Reset variables and exit                       *
  62. REM *------------------------------------------------------------------*
  63. :exit
  64. PROMPT %UUPCPRMPT%
  65. SET UUPCUSRRC=%UUPCUSRRX%
  66. SET UUPCPRMPT=
  67. SET UUPCUSRRX=
  68. :quit
  69.