RemoteApp sessions are disconnected when all RemoteApp windows and user-launched notification area icons are closed
When a user launches a Remote Desktop Services or Terminal Services RemoteApp, a Remote Desktop session is created in which the application runs. Any subsequent RemoteApps that are launched from the same client before the session is logged off will run in the same session. Additionally, any notification area (system tray) icons that are launched by the user will also run in the same session.
When all active application windows and all user-launched notification area icons are closed, the session remains active for 20 more seconds. This allows time for the user to launch another application, and for applications to display final messages or perform other closing tasks. If another application or system tray icon is not launched within that time, the RDP session is disconnected.
Leaving the session in a disconnected state allows subsequent RemoteApps to launch much more quickly. When a new RemoteApp is launched the session is simply reconnected instead of incurring the overhead of starting a new one.
By default disconnected RemoteApp sessions will remain in a disconnected state indefinitely. This behavior can be modified by a new Group Policy setting introduced in Windows Server 2008, "Set time limit for logoff of RemoteApp sessions". This setting is located in Group Policy under both Computer Configuration and User Configuration:
- Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\Session Time Limits
- User Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\Session Time Limits
- Log on to the terminal server as an administrator.
- Start the Local Group Policy Editor. To do this, click Start, click Run, type gpedit.msc, and then click OK.
- Locate the appropriate node under Computer Configuration or User Configuration as shown above.
- In the right pane of the Local Group Policy Editor, double-click "Set time limit for logoff of RemoteApp sessions".
- Click Enabled.
- In the RemoteApp session logoff delay list, select the desired time for logoff delay, and then click OK.
- At a command prompt type "gpupdate" and press ENTER to force the policy to refresh immediately on the local computer.
This topic is discussed in more detail in the following blog post:
rds remoteapp terminal services remote desktop disconnect logoff system tray notification area icon group policy rdp application
Article ID: 2345390 - Last Review: 08/18/2010 19:37:00 - Revision: 1.0
Windows Server 2008 Datacenter, Windows Server 2008 Enterprise, Windows Server 2008 Standard, Windows Server 2008 R2 Datacenter, Windows Server 2008 R2 Enterprise, Windows Server 2008 R2 Standard, Windows Server 2008 R2 Foundation
- kbrd KB2345390