Category : Network Files
Archive   : VAR.ZIP
Filename : SAMPLE.CMD

 
Output of file : SAMPLE.CMD contained in archive : VAR.ZIP

@REM=========================================================================
@REM This file is a sample logon script that shows how the svar-{dos/os2}
@REM could be used in a user logon script to establish local environment
@REM variables for use later in the script.
@REM=========================================================================

@echo off
net use f:

@REM=========================================================================
@REM The following two lines are the only ones that are needed to create the
@REM environment variables. In this example, svar-os2.exe is called from a
@REM public network drive (probably a common apps directory). It could just as
@REM easily be called from the localhard disk. If this was a DOS .BAT file,
@REM "svar-os2" would be replaced by "svar-dos".
@REM
@REM The name of the .cmd file called, $x$x$x$x, is the default temporary file
@REM name when the -f parameter is not specified.
@REM=========================================================================

f:svar-os2 -c computername -u -s -d -h homedir
call %temp%\$x$x$x$x

@REM=========================================================================
@REM The remaining 5 lines simply report the successful creation of the
@REM requested environment variables.
@REM=========================================================================

echo User = %user%
echo Computername = %computername%
echo Domain = %domain%
echo Server = %server%
echo Home directory = %homedir%

@REM=========================================================================
@REM Use of the environment variables to establish a user's "h" drive as
@REM the home directory could be as follows:
@REM
@REM net use h: \\%server%\%user%
@REM
@REM if there is a separately shared home directory for each user, with each
@REM home directory shared as the user name;
@REM or:
@REM
@REM net use h: \\%server%\home
@REM cd h:\%user%
@REM
@REM if there is a "home" share on each departmental server with a [user] named
@REM subdirectory for each user;
@REM or simply:
@REM
@REM net use h: %homedir%
@REM
@REM if the users full UNC home directory is specified in the user account
@REM home directory field.
@REM=========================================================================