当 RDP 处于最小化状态时,如何使用 pywinauto 在 RDP 中恢复窗口 [英] How to restore a window in RDP using pywinauto, when RDP is in Minimized state

查看:4344
本文介绍了当 RDP 处于最小化状态时,如何使用 pywinauto 在 RDP 中恢复窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 pywinauto 打开命令提示符 (Mingw-64) 并使用 type_keys

传递命令

它在我的本地系统中正常工作,但是,当我将代码托管到 RDP 服务器时,当 RDP 处于最小化状态时,我无法恢复窗口并传递命令>

请给我一个合适的解决方案,如果有任何软件包具有相同的目的,请告诉我.

谢谢!

解决方案

可以在此处找到有用的答案:https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/in-minimized-window.html

并且必须这样做才能断开与 RDP 的连接而无效:

<块引用>

要断开与远程桌面的连接,请在远程桌面上运行以下命令以管理员身份远程计算机(在远程桌面窗口中):

%windir%\System32\tscon.exe RDP-Tcp#NNN/dest:console

其中 RDP-Tcp#NNN 是您当前远程桌面会话的 ID,例如,RDP-Tcp#0.您可以在 Windows 任务管理器中看到它会话列中的用户选项卡.

您将看到您的远程桌面会话已结束"消息,并且远程桌面客户端将关闭.但是所有的程序和测试远程计算机将继续正常运行.

I have been using pywinauto for opening a command prompt (Mingw-64) and was passing commands using type_keys

It was working properly in my local system but, when i hosted my code into RDP server, i am not able to restore the window and pass the commands when RDP is in minimized state

Please give me a proper solution and let me know if any package does the same purpose.

Thanks!

解决方案

Useful answer can be found there: https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/in-minimized-window.html

And this must be done to disconnect from RDP without effect:

To disconnect from Remote Desktop, run the following command on the remote computer (in the Remote Desktop window) as an Administrator:

%windir%\System32\tscon.exe RDP-Tcp#NNN /dest:console

where RDP-Tcp#NNN is the ID of your current Remote Desktop session, for example, RDP-Tcp#0. You can see it in the Windows Task Manager on the Users tab, in the Session column.

You will see the "Your remote desktop session has ended" message, and the Remote Desktop client will close. But all programs and tests on the remote computer will continue running normally.

这篇关于当 RDP 处于最小化状态时,如何使用 pywinauto 在 RDP 中恢复窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆