Uipath can't perform clicks on a minimized RDP session

This is a script that is running on a Windows Server Machine where Studio is installed. The script needs to interact with a Windows Desktop application that is installed on the same server. The application does not use Citrix at all. And it works perfectly fine when I have the RDP session maximized. This is the logic that the script follows once that it starts:

  1. Log

  2. Start Process of the Application

  3. Attach Login screen Window, activate login screen Window, and Double Click one of the options

  4. Log “true”

  5. If error thrown, Kill Application process, Log error and try again

For this particular run, the first thing that I do is minimize the RDP session. In the log that is displayed in the image, you can see that it failed several times before I actually maximized the screen back. After this, it printed "true"Âť as expected. The AttachWindow Activity seem to work well. However, the error is thrown at the double click.

I saw somebody recommending using hotkeys instead of clicking. This application does not accept hotkeys. It has to be a click.

I also saw in this post that modifying the registry could make it work. However, it did not in my case. It still fails.

How should I attack this?

Thanks

EDIT: Forgot to mention that I also tried using Launch Workflow Interactive with this piece of logic and it did not work. Also, everything is using Selectors. I am not using anything else.

I really thought that Uipath could work completely unattended…

I don’t think you can minimize an RDP session while a process is running; from my understanding, it disconnects your robot once you do.

One thing you can try is instead of minimizing just bring another window into focus.

It seems like this could be changed in the registry, but I’m not sure what value to change if you can.

Also, verify that in your UiPath.settings file that you have “LogonToConsole” to false.

Hope this helps

Regards.

EDIT: I’ll also mention if you use “Launch Workflow Interactive” to kick off your workflow, it might help resolve screen and resolution issues causing problems to your robot. Thanks.

I don’t think you can minimize an RDP session while a process is running; from my understanding, it disconnects your robot once you do.

Do you think it will be possible with Orchestrator? Having the Robots their own credentials…

It seems like this could be changed in the registry, but I’m not sure what value to change if you can.

I tried this and it did not work

Also, verify that in your UiPath.settings file that you have LogonToConsole to false.

Verified

EDIT: I’ll also mention if you use Launch Workflow Interactive to kick off your workflow, it might help resolve screen and resolution issues causing problems to your robot.

Tried it too

Thanks for trying!

It works just like the user logging in, with slight differences. The Launch Interactive should simulate the unattended if you were curious by checking its logontoconsole parameter, then it will kick you off the server to run (but you can log back in to watch it if you wanted.

If there are problems with the process where Exceptions are being thrown and Retries, then I would suspect there’s a flaw with the workflow. If that’s the case, then I’d look at what the Exception says and on which activity.

Not really, as I said, the exceptions are only thrown when I minimize, not when I attend the robot

Thanks for the help

Is it throwing the Exception on the Attach Window with Selector is not found?
I was thinking what if you have “Visible” unchecked. If it is you might try having it Visible instead.

Just throwing out more ideas.

Hope you find a solution.

There are two ways to minimize RDP.

  1. Using direct Minimize button - With this method bot won’t work as it disconnects the session

  2. Click on Restore button(next to Minimize) and then Minimize it. It works with this method as the session still remains connected.

Please try Method #2 to run the bot in minimized RDP.

Regards,
Madhavi

1 Like

This is not working for me @Madhavi_Jaiswal.

Screen scrapping is not working when I minimized ( Restore and then Minimize) my RDP…!?

@Madhavi_Jaiswal The only way this works is when you click on the Restore button and then alt-tab to some different screen but not minimizing the RDP.
I tested this and my robot can open the browser, log in using Type-Into command and Click commands are also working fine.
Please try this, @llavieri if you still have this issue after almost a year :laughing:

1 Like

Hi,

I am also facing the same issue. When BOT is running and I connect RDP (maximize) then working fine.
The moment I disconnect RDP or minimize it then BOT starts failing. Do I need to make any environment changes as BOT was working fine (with UiPath 2018.2) before upgrading to UiPath 2018.4

Hi @sapnagupta

Please see here:

3 Likes

@loginerror is this link not related to when the bot is on your local machine and you are interacting with a VM as opposed to when then the bot is actually on the VM?

Correct, it seems to answer the previous questions in this topic.

If you have issue with a different scenario, feel free to open a new topic :slight_smile:

1 Like

Facing the same issue, tried this solution but didn’t worked.

I took too long to get it done.

Remote desktop connection closed
Sometimes users want to open a Remote Desktop Connection, start running tests on the remote machine, and disconnect the client connection while the tests are running.

In this case, native events (including screenshots) do not work.

To work around this, do the following instead of closing the remote desktop connection directly.
Create a batch file on the remote machine’s desktop (for example: “disconnect.bat”).
Type the following line in the file -

tscon% sessionname% / dest: console

You can get the Session Name by typing “query session” at the CMD prompt (as administrator)

and save it.
Start the tests on the remote machine. It is fantastic!
Do not close Remote Desktop Connection directly from the client.
Instead, double-click the batch file. The session will be ended by the remote desktop.
Native events should now work well with Remote Desktop Connection closed.

Hi…

I really need your advice… Your post seems just what I want but it doesnt work

can you some errors ?

When I save it as BAT and run it, nothing happens.

Also I have tried with sessionname: rdp-tcp#53

tscon% rdp-tcp#53% / dest: console