开发者

Keeping remote desktop session "alive" [closed]

Closed. This question do开发者_运维百科es not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Closed 4 years ago.

Improve this question

I'm using AutoIt to automate GUI operations (connecting to the machine that's running the to-be-automated app, using RDP). Whenever I minimize the RDP window (using mRemote) no further AutoIt commands are performed.

Maybe the RDP session is marked "inactive" when I minimize the window (I don't know if that's true, nor how to configure this behavior, if so). I'm thinking about 2 options to overcome this:

  1. Running my process as some elevated user (or a service).
  2. Finding this configuration which controls whether session is marked inactive and override it.

How to keep remote desktop session "alive" when the RDP window gets minimized?


We had the same problem with RDP. A workaround we used was to open another remote desktop session to connect to the same server:

  1. You connect to server with RD.
  2. From RD of step 1, you connect to server once again.

This way the 2nd session will be still "active" when you minimize or even disconnect your first RD session. Of course your Remote Desktop server has to support multiple connections from the same user.


You might want to attach your current RDP session to the CONSOLE. In such case even after disconnection the UI will be still active.

TSCON {sessionid | sessionname} /DEST:CONSOLE


My nightly regression suite used to fail on my local machine because enterprise rules locked the machine automatically after 14 mins of inactivity. So I wrote a small vbScript program to press "PrintScreen" key every 12 mins and it really solved the problem. Though this was not on RDP, but executing something similar on remote machine would help.


The accepted answer doesn't work if there is no rdp session at all, and you still want automate it through AutoIt.

They say in this case you should not use WinActivate and use ControlSend in AutoIt scripts instead, and it would work smoothly. And yes, that works, checked it myself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜