[bit.listserv.novell] DOS Environment variables

bdahlen@ZEPHYR.CAIR.DU.EDU (Robert L. Dahlen @ U. of Denver USA=) (02/09/90)

We have a multi-server network where I would like to have a drive
mapped based on a previously set DOS environment variable.

Is there any way to include DOS Environment variables in a login
script?  Say for instance:

C> SET NET=KING

C> MAP S1=%NET%/SYS:PUBLIC

-------------------------------------------------------------------
Robert L. Dahlen - Director, Information Systems & Technology
University of Denver - Denver, Colorado 80208 (303) 871-4385
INET:bdahlen@du.edu BITNET:bdahlen@ducair UUCP:ncar!dunike!bdahlen

LARRY@VM.NRC.CA (Larry Bradley) (02/09/90)

On Thu, 8 Feb 90 15:06:35 MDT Robert L. Dahlen @ U. of Denver USA= said:
>I would like to have a drive
>mapped based on a previously set DOS environment variable.
>
>Is there any way to include DOS Environment variables in a login
>script?  Say for instance:
>
>C> SET NET=KING
>
>C> MAP S1=%NET%/SYS:PUBLIC
>
The way I handle problems like that (the Novell login scripts won't
let you do a lot of things) is to have the Novell login script exit
to a DOS batch file (called autonet.bat). The login script does the
things that it does best, and sets up some environment variables.
Then the autonet.bat file does the rest, based on the settings of
the envronment variables.

We actually take this to some extremes ... the autonet.bat file
invokes an autouser.bat file on exit, so the user has a place to do
his thing ... the autonet.bat file is the equivalent of the system
login script, while the autouser.bat is the equivalent to the user
login script. One of the things that this type of thing is useful
for is invoking or TSRs ... you can't invoke a TSR from a login
script, otherwise you will trap the login.exe module in memory
before your TSR, thus gobbling up even more of your precious 640K.


*------------------------------------+----------------------*
|Larry Bradley                       |    LARRY@VM.NRC.CA   |
|Communications Manager              | Larry.Bradley@NRC.CA |
|National Research Council of Canada |    LARRY@NRCVM01     |
|Networks Branch                     |                      |
|M60, Montreal Road                  | (613)993-0240        |
|Ottawa, Canada  K1A 0R6             | FAX:(613) 954-2561   |
*------------------------------------+----------------------*

CHAPMAN@NYUACF.BITNET (02/09/90)

I pass environment variables into the login script by using parameters
to the login command.  E.g. if I have previously done

     set location = lab1

then a user might login with the following command:

     login fs1/username %location%

The command is executed from a DOS batch file.