If you are like me, and sometimes need to run lengthy scripts in a remote desktop session, the auto-disconnect feature can cause a bit of a pain. If you have the need to keep the session alive, you can enable or disable via the following:
Windows XP and Windows Server 2003
To work around this issue, follow these steps:1. Click Start, click Run, type gpedit.msc, and then click OK.
2. Expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Terminal Services.
3. In the right pane, double-click Keep-Alive Connections.
4. Click Enabled, and then click OK.
5. Close Group Policy Object Editor, click OK, and then quit Active Directory Users and Computers.