Article ID: 183495 - Last Review: February 23, 2007 - Revision: 2.2 %LOGONSERVER% Variable not Available After Logon ScriptThis 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 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.
| Article Translations
|
Back to the top
