The following commands are for text file usage:
Each of these commands is covered in detail in the following sections. The # SymbolThe # symbol executes a program that is external to the login script and waits until it is finished running before continuing with other login script commands. # [ path ] filename [ parameter ] Replace path with a drive letter. Replace filename with the executable file. It isn't necessary to include the extension, but doing so can speed up the execution of the external program. Replace parameter with any parameters required by the executable file. TIP Use the @ command, described in the following section, instead of the # command if an external program will remain open for any length of time. Otherwise, the login script will remain "open" until the external program closes (login scripts cannot be edited when they are held open ). The @ CommandThe @ command executes a program that is external to the login script and then continues with the script (similar to the Startup group in Windows). @ [ path ] filename [ parameter ] Replace path with a drive letter. Replace filename with an executable. Do not include the extension. Replace parameter with any parameters required by the executable file. For example, if you want to start the GroupWise program from within the login script, use the following command: @SYS:\APPS\GROUPWISE\GRPWISE DISPLAYDISPLAY shows the contents of a text file when the user logs in. All characters in the file, including any printer and word processing codes, appear. DISPLAY [ path ] filename Replace path with either a drive letter or a full directory path beginning with the volume name . Replace filename with the complete name (including the extension) of the file you want to display. For example, you can put messages in a file SYS:PUBLIC\MESSGES\NEWS.TXT . To have the messages shown to users when they log in on Monday, add the following lines to the container login script: IF DAY_OF_WEEK=" Monday" THEN DISPLAY SYS:PUBLIC\MESSAGES\NEWS.TXT END EXITUse EXIT to terminate execution of the login script. WARNING You cannot use EXIT in a login script to stop the login script and execute a program. EXIT only terminates the execution of the login script. If you want to execute a program after exiting the login script, use # or @ followed on the next line by EXIT . FDISPLAYFDISPLAY shows the text of a word processing file when the user logs in. When you use FDISPLAY to display a word processing file, the text is filtered and formatted so that only the text is displayed. FDISPLAY [ path ] filename Replace path with either a drive letter or a full directory path beginning with the volume name. Replace filename with the complete name (including the extension) of the file you want to display. For example, you can put messages in a file SYS:PUBLIC\MESSGES\NEWS.DOC . To have the messages shown to users when they log in on Monday, add the following lines to the container login script: IF DAY_OF_WEEK=" Monday" THEN FDISPLAY SYS:PUBLIC\MESSAGES\NEWS.DOC END TERMTERM is normally used only for Application Launcher scripts, a component of Novell ZEN for Desktops (ZfD). Use the TERM command in a login script to stop the login script and return an error code. You can also use TERM in an IF...THEN statement, so that the login script stops and an error code is returned only if a condition is true (that is, if a certain condition exists). If the condition doesn't occur the login script skips the TERM command and continues executing. WARNING Because TERM stops the login script, be sure to put this command either at the end of the login script or at a point within the script where you intend execution to stop. Do not nest the TERM command in the login script. If you add TERM to a container login script, it prevents other profile or user login scripts from running. If you put TERM in a profile login script, it prevents the user login script from running. WRITEWRITE displays messages on the workstation screen when a user logs in to the network. Text you want to display must be enclosed in quotation marks (" "). There are several ways to display variables in the text message. The way you enter the variable in the WRITE command determines the display format, as follows :
Text strings can include the following special characters:
In addition to the semicolon, you can use other operators to join text and identifier variables into one command. These operators are listed in order of precedence:
For example: WRITE "[ text ][% identifier ] [;][ identifier ]" Replace text with the words you want to display on the screen. Replace identifier with a variable you want to display. For example, to display the message "Hello," along with the user's last name, add the following line to the login script: WRITE "Hello, ;%LAST_NAME" To make a beep sound occur while the phrase "Good morning" appears on the screen, add the following line to the login script: WRITE "Good %GREETING_TIME " |