script to keep RDP session active?

Hello,

I've search but couldn't find anything close to it.  I'm looking for a script which would keep a RDP session active.  I know what to set in the registry but a script that runs would be better.  Does anyone have a solution?  thx

October 5th, 2011 5:04pm

Hi,

When you say you know what to set in the registry, what are you referring to?

Bill

Free Windows Admin Tool Kit Click here and download it now
October 5th, 2011 5:22pm

there are four remote terminal settings that we have to eliminate in our environment and I could set them temp. to 0 but then if a scan is ran by the other department, it will show up.  So, I thought that a script would be the best option.  Usually I move the mouse every 10 minutes but when I go to lunch, i get always kicked out and can ran the 4-6 hr scans again (if i'm lucky, they will go faster)....
October 5th, 2011 6:07pm

a simple script that would move the mouse randomly would most likely work ... but I'm not a programmer
Free Windows Admin Tool Kit Click here and download it now
October 5th, 2011 6:09pm

there are four remote terminal settings that we have to eliminate in our environment and I could set them temp. to 0 but then if a scan is ran by the other department, it will show up.

Hi,

I read this several times, but it's completely incomprehensible to me; sorry.

The correct way to prevent disconnects on Terminal Server is to configure this on the server end (not a scripting question)

Bill

October 5th, 2011 7:23pm

a simple script that would move the mouse randomly would most likely work ... but I'm not a programmer


What you want to do will not work with TS.  It will only honor actual human interface events which you cannot synthesize with a script or a program.  TS hooks the hardware interrupt to read keyboard and mouse input. 

The only way it might be done is to hook the driver chain and force an interrupt somehow.  This cannot be done in script and I am not sure it is possible to do this with a driver.

YOu are not the first to tink of this.  It was brought up in NT4 with the first version of Terminal Server.  Have your admins disable timeouts on your profile.

 

Free Windows Admin Tool Kit Click here and download it now
October 5th, 2011 9:59pm

Thanks for the input.  I'm actually the sys admin and kno how to disable them but if you have 150 servers and it is unknown how long a individual scan might take, i though a script would resolve it.  of well,.. thanks fo the input guys
October 6th, 2011 2:26pm

Hi,

You know how to disable what? And what's an "individual scan"?

In any case, the correct procedure would usually be to configure the Terminal Server's session time limits in a GPO.

Bill

Free Windows Admin Tool Kit Click here and download it now
October 6th, 2011 2:51pm

Hey Flav,

You probably won't find a script for this purpose because your session will stay active if you just configure it correctly, that's what it's made to do. If it's not, then you probably have a more serious problem. While this isn't a Remote Desktop Services (formerly Terminal Services) Forum, I do have a few suggestions:

 

  • As Bill mentioned and most importantly - Check your Group Policy settings, or at least check your local policy on that machine to make sure you aren't being disconnected due to inactivity
  • If it's not a policy setting causing you to be disconnected, then it's most likely a firewall timeout or networking problems - If it's a firewall issue, you can configure the keep-alive connection interval : http://technet.microsoft.com/en-us/library/cc731606(WS.10).aspx 

Good Luck!

-Dan

 

October 7th, 2011 11:59am

Hi,

did you found any option for keeping server alive

Thank you in advance

Free Windows Admin Tool Kit Click here and download it now
August 12th, 2015 11:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics