User Guide
62 Novell Client for Windows
Novell Client for Windows
103-000159-001
December 7, 2001
Novell Confidential
Manual 99a38 July 17, 2001
Using Identifier Variables
Many login script commands allow you to take advantage of identifier
variables to make login scripts more efficient and flexible.
Use identifier variables to enter a variable (such as LAST_NAME) rather than
a specific name (such as Smith) in a login script command. When the login
script executes, it substitutes real values for the identifier variables.
By using the variable, you can make the same login script command
applicable to multiple users.
When using variables within login script commands, observe the following
conventions:
Type the variable exactly as shown.
To use environment variables as identifiers, enclose them in angle
brackets (< >).
Identifier variables are used most often with commands such as
IF...THEN, MAP, and WRITE. They can also be used with commands
that you can specify a path for, such as COMSPEC.
Identifier variables can be placed within literal text strings in a WRITE
statement. However, the identifier variable must be in uppercase letters
and preceded by a percent sign. (Literal text is the text that is displayed
on the screen, such as “Sales report is due today.” Literal text must be
enclosed in quotation marks.)
For example, using the %LAST_NAME variable substitutes the user’s actual
last name for the LAST_NAME variable in the command when the user logs
in. For example,
WRITE "HELLO, "%LAST_NAME
displays the following message on Bob Smith’s workstation screen when he
logs in:
Hello, SMITH
Using the %GREETING_TIME variable displays the time of day. If Bob
Smith logs in during the morning, both of the following lines display the same
message (Good morning, SMITH) on his screen:
WRITE "Good "; GREETING_TIME;", "; LAST_NAME
WRITE "Good %GREETING_TIME,%LAST_NAME"