%LOGONSERVER% Variable not Available After Logon Script (183495)
The information in this article applies to:
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Professional
- Microsoft Windows NT Workstation 4.0
- Microsoft Windows NT Server 4.0
This article was previously published under Q183495 SYMPTOMS
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.
CAUSE
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.
RESOLUTION
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%
to the logon script to preserve the setting of the LOGONSERVER environment
variable for later use.
STATUS
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.
Modification Type: | Major | Last Reviewed: | 6/3/2003 |
---|
Keywords: | kbbug kbpending KB183495 |
---|
|