Click activity works in Studio but fails when workflow is triggered via CMD + UiRobot

Hi, I have a question about UiPath execution behavior.

My workflow works perfectly when I run it directly from UiPath Studio, including all Click activities.

However, when I trigger the same workflow via CMD using UiRobot.exe (scheduled execution),
the Click activities stop working, although the application still opens and Type Into works.

This setup worked before and stopped working recently.
Same user, unlocked desktop, no Simulate Click.

Has anyone encountered Click failures when running workflows via UiRobot CLI?
Is this a Windows foreground or execution context issue?

Hi @Jacky_Ho

When running via UiRobot.exe (CMD / Scheduler), the process may start without true foreground focus, even if the desktop is unlocked. Click activities require an active foreground window, while Type Into can work via window messages. Studio forces an interactive execution context, which is why it works there.

Adding Activate before Click, ensuring the task runs only when the user is logged on, or switching to Simulate Click resolves the issue.

Cheers

1 Like

Hey @Jacky_Ho,

Why don’t you try this :
This usually happens because when the job is started from UiRobot.exe in CMD, it runs in a different Windows context and doesn’t properly own the foreground window. Studio runs interactively, so clicks work there. Type Into still works, but Click fails due to focus issues. The fix is to activate the application before clicking, use Simulate Click or SendWindowMessages where possible, avoid coordinate-based clicks, and make sure the session is unlocked and active. Running the process from Orchestrator or Assistant is generally more reliable than using the CLI.

Just let me know if you still facing any issue

1 Like

Hi @nishiijain2000
I already tried this 2 approaches ,but it’s still the same.
Thx for the advice though.

@Jacky_Ho
Try this one without simulate
SendWindowMessages = True
MouseDown + MouseUp instead of Click
Hardware Events = True
Each uses a different Windows interaction path.
Cheers

Hi @nishiijain2000
I tried Simulate Click as well, but it’s still the same.

I normally run my daily workflows via CMD.
If this can’t be fixed, I’ll try using Orchestrator or UiPath Assistant.

Thanks for the suggestion.

Please check if robot is disconnected
Open UiPath asssitant go to preference
Please make sure attended robot is connected
And confirm login to console part is not skipped
Let me know if u still face issue
Cheers

Please try to run the process through UiPath assistant instead of CMD
Open UiPath Assistant
Keep it connected (green)
Trigger the same process from Assistant
Hope it’s help

@Maheep_Tiwari,Hi
I don’t see the Hardware Events option.
Is it under the Click activity properties?

If Simulate Click also fails, this is a Windows execution context issue with jobs started from CMD. UiRobot.exe does not reliably attach to the interactive desktop, so Click actions break. There is no stable workflow-level fix for this. The practical solution is to run UI automations from Orchestrator or UiPath Assistant instead of CMD.

1 Like

@Jacky_Ho

What license are you using?

and is it running with VM/machine open or close?

ideally for anythign running from CMD you need to run in user context that is machine should be open and available

cheers

@Jacky_Ho

Could you provide dependencies version of system activities used. Could you provide more details other click all actions are working fine, which is performed before the click you are trying to perform.

Hi @Jacky_Ho

If you need any further help related to this feel free to ask and if this soltion works, please mark it as the Accepted Solution

Thanks