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 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
我们在使用 RDP 时也遇到了同样的问题。我们使用的解决方法是打开另一个远程桌面会话来连接到同一服务器:
服务器
。服务器
。这样,当您最小化甚至断开第一个 RD 会话时,第二个会话仍将处于“活动”状态。当然,您的远程桌面服务器必须支持来自同一用户的多个连接。
We had the same problem with RDP. A workaround we used was to open another remote desktop session to connect to the same server:
server
with RD.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.
您可能希望将当前的 RDP 会话附加到控制台。在这种情况下,即使在断开连接后,UI 仍将处于活动状态。
You might want to attach your current RDP session to the CONSOLE. In such case even after disconnection the UI will be still active.
我的夜间回归套件过去常常在本地计算机上失败,因为企业规则在 14 分钟不活动后自动锁定计算机。所以我写了一个小的 vbScript 程序,每 12 分钟按一次“PrintScreen”键,它确实解决了问题。虽然这不是在 RDP 上,但在远程计算机上执行类似的操作会有所帮助。
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.
如果根本没有 rdp 会话,并且您仍然希望通过 AutoIt 实现自动化,则接受的答案不起作用。
他们说在这种情况下,您不应该使用 WinActivate,而应在 AutoIt 脚本中使用 ControlSend,这样它就会顺利工作。是的,这有效,我自己检查过。
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.