Site hosted by Angelfire.com: Build your free website today!

Login Script Commands (and Variables)

#
This is used to run or execute an external command (COM or EXE)
#ENDCAP
runs the external command ENDCAP.EXE.
To run a batch file called DOIT.BAT use
#COMMAND.COM /C DOIT.BAT

ATTACH
Used to connect or attach the user to another fileserver
ATTACH <servername> / <user name>
ATTACH HEATHMONT2/DON

BREAK
BREAK ON is used to allow CTRL-BREAK to stop the login script and BREAK OFF is used to disable CTRL-BREAK from halting the execution of the login script

COMSPEC
Used to indicate where an alternate copy of COMMAND.COM resides if it is necessary to reload it COMSPEC=<drive>:<path and filename> See sample login scripts

DISPLAY
Displays the contents of an ASCII file -must not contain formatting characters e.g. DISPLAY f:\login\rules.txt displays the contents of the file RULES.TXT in the LOGIN subdirectory of F: drive DOS VERIFY
DOS VERIFY ON turns on DOS read after write verification and DOS VERIFY OFF turns it off

DOS BREAK
DOS BREAK ON allows CTRL-C or CTRL-BREAK to stop execution and DOS BREAK OFF disables this

DOS SET
Allows you to pass Novell variables to DOS E.G.
DOS SET USER="%LOGIN_NAME"
assigns the variable USER the name of the user which is stored in the Novell variable LOGIN_NAME (this can then be used in DOS batch files etc)

DRIVE
Allows you to change to another drive E.g. DRIVE Q: will change to drive Q:

EXIT
Stops the execution of the login script. You can also pass the name of a command that you want to execute at the end of the script E.g.
EXIT
stops the script execution and returns to the command prompt.
EXIT "DMENU.BAT"
stops the script and then runs a batch file.

FDISPLAY
Displays the contents of a text file and also removes format characters E.g.
FDISPLAY F:\LOGIN\EXTRA.TXT
FIRE PHASERS
Makes a sound E.g.
FIRE PHASERS 8 TIMES
to have the sound occur 8 times

GOTO
Branch to a specified label E.g.
GOTO PLACE1.
Somewhere in the script would be the label PLACE1:

IF..THEN..ELSE..END
Decision statement See sample scripts

INCLUDE
Allows you to carry out login script command stored in an external ASCII file

MACHINE NAME
Allows you to change the value stored in the variable %MACHINE. You only need to use this if you have given this variable a value other than IBM_PC in the workstation configuration file (NET.CFG) E.g.
MACHINE NAME="EGA"
although more commonly
MACHINE NAME="IBM_PC"

MAP
Displays the currently defined drive and search drive mappings
Define a drive or search drive E.g.
MAP G:=F:\APPS
see sample scripts

MAP DISPLAY ON
Display the results of MAP commands

MAP DISPLAY OFF
Do not display the results of MAP commands

MAP ERRORS ON
Display any errors that result from MAP commands

MAP ERRORS OFF
Do not display any errors that result from MAP commands

PAUSE
Halt the execution of the login script until the user presses a key

PCCOMPATIBLE
This command ensures that the EXIT command is not ignored and so works properly (usually not now required)

REM or REMARK or ; or *
Allows you to add comments to your login scripts

SHIFT
Allows you to shift parameters included with the LOGIN command left or right E.g.
SHIFT 1
renumbers the first command line parameter from %1 to %0, %2 to %1 and so on - not often used (SHIFT -1 does the opposite)

WAIT
Similar to PAUSE

WRITE
Place information on the screen

Login Script Variables

SECOND Stores a value from 0 to 59

MINUTE Stores a number from 0 to 59 indicating the current minute

HOUR Stores a number from 1 to 12 to indicate the current hour

HOUR24 Stores a number from 0 to 23 to indicate the current hour using 24 hour time

AM_PM Stores either AM or PM depending upon the workstation time

GREETING_TIME Stores morning or afternoon

DAY Stores a number from 1 to 31 to indicate what day of the month it is (based on the workstation date)

DAY_OF_WEEK Stores Monday, Tuesday etc, based on the workstation date

NDAY_OF_WEEK Stores a number between 1 and 7, where 1=Monday, 2=Tuesday etc

MONTH Stores a number from 1 to 12 indicating the current month

MONTH_NAME Stores January, February etc

YEAR Stores the current year using 4 digits

SHORT_YEAR Stores the digits 0 to 99 - the last to digits of the year (87 means 1987)

ERROR_LEVEL Similar to DOS error level

FILE_SERVER Stores the name of the Fileserver to which you are currently attached

NETWORK_ADDRESS Stores the IPX number of the current Fileserver

P_STATION Stores the 12 digit hexadecimal number of the NIC inside the workstation

SHELL_TYPE Stores the version number of the Netware DOS Requester

FULL_NAME Stores the users full name

SMACHINE Stores the short name of the computer

STATION Stores the connection number of the user

USER_ID Stores the hexadecimal number assigned to the user by Netware

LOGIN_NAME Stores the name that the user used to LOGIN to the network

MEMBER Used to IF statements to check if the user is a member of a group. Also NOT MEMBER checks for the opposite.

MACHINE or MACHINE NAME Stores the LONG MACHINE NAME of the computer as specified in the NET.CFG file. The default is IBM_PC.

OS Stores the operating system of the connecting PC (e.g. MSDOS for MSDOS based PCs)

OS_VERSION Stores the version of the connecting PC’s operating system(see sample login scripts)

PASSWORD_EXPIRES Stores the number of days before the current password will expire

%0, %1, %2 etc Stores the command line parameters-%0 is the command itself, %1 the first parameter, %2 the second etc

< > Stores the contents of a DOS environment variable

 

 © 1997-2001 Ronaldsoft Network. All rights reserved. Designed by: Ronaldsoft