Is there any possibility to keep an RDP session as "active" when it was actually disconnected? We are running windows-server-2012 on a virtual machine.
Background:
we are automatically executing GUI tests on that machine.
- If someone is logged in via RDP (and does nothing), the tests succeed
- If the RDP session is disconnected, the tests fail at a point where keyboard strokes are simulated
So I guess it has something to do with the session being active or disconnected.
Best Answer
Just save this as a .bat on the remote system and replace the "START CALC.EXE" line with the executable you'd actually like to run. When you're ready to run your test, RDP into the system and run the batch file.
What this script does is first gets admin rights, then switches your current user session from RDP to console. You'll get disconnected from the RDP session, but as long as there isn't a screen saver or screen lock, your application should be able to run to completion.