Windows 2008 Server RemoteApp. How to keep the app running after disconnected from the server

Solution 1:

Solution 1

There is a setting in the Group Policies on the server that controls how RemoteApp applications should behave when they are disconnected.
Basically, a log off is performed by default when you close a RemoteApp, but you can change this setting to up to 5 days (might be possible to increase this limit through the registry).

You will find the settings on the server here (for Win2008):

Local group Policies (run gpedit.msc)
  > Computer Configuration
    > Administrative Templates
      > Windows Components
        > Remote Desktop Services
          > Remote Desktop Session Host 
            > Session Time Limits
              > Set time limit for logoff of RemoteApp sessions

Note: make sure you don't override disconnect/log-off settings through the Computer Configuration or User configuration or it won't have any effect as they would have precedence.

Solution 2

Use the tsdiscon tool to disconnect the session instead of closing the application.
In that case, make sure again that your Computer configuration or user Configuration settings do not enforce some time-out that would result in the session being closed when you don't want to.

References

  • Terminal Services RemoteApp™ Session Termination Logic
  • HOW TO: Disconnect a Session by Using the TSDISCON Command in Windows 2000 Terminal Services
  • How can I disconnect a Terminal Services (TS) RemoteApp session instead of closing the application?
  • Terminal Services commands