Python Forum

Full Version: To access already running remote desktop application using pywinauto
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi ,
Greetings!!!
I am new to python and pywinauto. I learnt that pywinauto can access already running application hence i would like to know solution on following problem statement

Problem statement: To access WinScp, we use CyberArk and then WinScp tool runs on remote desktop application. I would like to access this WinScp which is running via remote desktop connection using pywinauto to perform certain actions and take screenshots.

I would like to know whether it is possible to access already running Remote desktop application (WinScp) using pywinauto or not?
If yes then may i know example of coding pertaining to this problem statement?

Kindly support.

Regards,
Vyom
I don't think pywinauto can find windows that are running on a remote desktop, but you might be able to do this using pywinauto in conjunction with remote python calls (RPyC). On the remote machine you would run a script that uses pywinauto to talk to CyberArc and WinScp (I know nothing about either of these tools), and on the local machine you would use RPyC to talk to that script.

But before jumping to conclusions, have you tried anything? I would start really simple, like this:
from pywinauto import Desktop

windows = Desktop(backend="uia").windows()
print([w.window_text() for w in windows])
You'll see your remote desktop window, but does it list anything that is running on the remote desktop?

Running on a remote desktop is discussed in the pywinauto documentation, but there is no provides solution. Read what they have here:

https://pywinauto.readthedocs.io/en/late...ution.html