%LOGONSERVER% Variable not Available After Logon ScriptID: Q183495
|
When a logon script is run, the LOGONSERVER environment variable is only
available while the logon script runs. After the logon script finishes, the
LOGONSERVER environment variable is no longer available to other running
processes.
If a logon script is NOT run, the LOGONSERVER environment variable is
available to all processes after a successful logon attempt.
After a logon script is run, volatile environment variables created during
logon script execution are deleted from the environment, by design.
LOGONSERVER is created as a volatile environment variable to cater for the
case when there are multiple networks configured with logon capabilities.
Therefore, after a logon script has been run, the LOGONSERVER environment
variable is erased from the environment.
If you run logon scripts, and need access to the LOGONSERVER variable after
logging on, one possible workaround is to run SETX (a Windows NT resource
kit utility) from within the logon script to set a permanent environment
variable based on LOGONSERVER.
For example, you could add a line like
SETX MyLogonServer %LOGONSERVER%
Microsoft has confirmed this to be a problem in Windows NT version 4.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
Keywords : kbbug4.00 NTSrvWkst
Version : WinNT:4.0
Platform : winnt
Issue type : kbbug
Last Reviewed: February 5, 1999