jeudi 2 avril 2020

Type password automatically for RDP connection

As an exercise, I'm trying to automate typing RDP credentials using FlaUI. My OS is Windows 10.

I'm able to start mstsc.exe and type into this window:

mstsc window

But then I get this window and I can't find it anywhere:

Credential Manager UI Host window

It's not a mstsc window, even though it appears on it as a modal window: mstsc always has just one window. Apparently it's a window of "Credential Manager UI Host", but that process has... zero windows.

Even in task manager it's listed in the background tasks and not in the applications section. FlaUI Inspect doesn't see it at all.

By the way, this is my code:

var CurrentAutomation = new UIA3Automation();
var Process = Application.Attach(Process.GetProcessesByName("CredentialUIBroker")[0]);
var Windows = Process.GetAllTopLevelWindows(CurrentAutomation); // 0 elements

How can I get a handle to this window and access its textbox using FlaUI?

Aucun commentaire:

Enregistrer un commentaire