Windows Terminal Server, Remote Desktop Services, Presentation Virtualization, Application Delivery, Remote Application Development and Market Analysis
Navigation
About
Author's Profile
... About this Web Site
... Benny's Short Profile
... Benny's Biography
... Presentations 2010, 2009, 2008, 2007, 2006, 2005, 2004 and earlier
Awards

 

Q&A Execution of default login script on Terminal Servers

Posted by Benny Tritsch on April 30, 2004

Question

I login to my Windows 2000 Terminal Server which is part of my Windows 2000 domain. For some reason two login scripts are executed and if I remove the login script from users profile one is still executed. Where is this other login script coming from? I don't have any login scripts running in group policy and when the user logs in he inherits the default user profile from the terminal server. I have the group policy loopback enabled for this computer. Would this cause the problem? The two login scripts are different though.

Answer

Each terminal server holds a systemwide logon script (UsrLogon.cmd). This script can perform global configuration changes that might only be required on a multiple-user system. Due to the dependencies of the installed applications as regards the changes, the systemwide logon script invokes application-specific scripts for the changes.

In the registry, the setting for this behaviour is located at HKLM \Software \Microsoft \Windows NT \CurrentVersion \Winlogon. It includes the AppSetup key, that defines the special script file called UsrLogon.cmd on terminal servers in application mode. This script file is executed along with a possible logon script on startup of each terminal server session

If you want to know more about the logic behind UsrLogon.cmd, check this article about application compatibility scripts. Most of it is still true for Windows 2000 Server and Windows Server 2003.