Login Script Example
Articles and Tips: tip
01 Apr 2001
As an example, assume that the Container where the workstation's context is set is found in the Network Properties. Below is the sample login script:
IF "%REQUESTER_CONTEXT"="[Root]" THEN INCLUDE TESTSCRIPT ELSE IF "%2"="TRAVEL" THEN INCLUDE .PRESCRIPT.%REQUESTER_CONTEXT INCLUDE .TESTSCRIPT.%REQUESTER_CONTEXT INCLUDE .POSTSCRIPT.%REQUESTER_CONTEXT EXIT ELSE WRITE "LOGIN CONTEXT IS %LOGIN_CONTEXT" WRITE "REQUESTER CONTEXT IS %REQUESTER_CONTEXT" PAUSE INCLUDE .TESTSCRIPT.%REQUESTER_CONTEXT END END
Below is the login script in the container where the workstation's context is set in Network Properties:
MAP DISPLAY OFF MAP ERRORS OFF WRITE"OS VERSION IS %OS" PAUSE IF "%OS"="WIN95" THEN IF "%REQUESTER_CONTEXT"="[ROOT]" THEN INCLUDE WIN95 ELSE INCLUDE .WIN95.%LOGIN_CONTEXT END GOTO ENDSCRIPT END ENDSCRIPT:
Keep in mind that Requester_Context behaves differently according to how the user is logged in to the workstation. The following list explains those differences:
If the Windows 95/98 workstation is shut down between logins, the REQUESTER_CONTEXT will remain the same as the Network Properties | Name Context setting that you set in the Control Panel. The LOGIN_CONTEXT will match the context where the user object is located.
If the user shuts down the workstation, closes all programs, and logs in as a different user, the context is changed in the Connection tab and the REQUESTER_CONTEXT will change to match the LOGIN_CONTEXT on the second login. Here is an example of this.
The first login process:
The next login:
If the LOGIN_CONTEXT on this login is NTS.NOVELL, on the next login it will be:
If the Windows workstation is shut down between logins, the REQUESTER_CONTEXT will remain the same as the Network Properties | Context setting in the Control Panel.
The following parameter contains the parameter from which the user originally started the login process. The line in the login script would look something like:
You must include the leading period, unless you are trying to access a container that is below the container you are currently in.
However, if multiple users are using this workstation, it must be rebooted in order for the above statement to have its desired effect. If the workstation is not rebooted, the user will be left in whatever context the workstation may have been in (not necessarily the specified workstation context).
* Originally published in Novell AppNotes
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.