Is it possible to trigger robot using command prompt on orchestrator in unattended mode?

Hi could anyone please let me know if is it possible to trigger a process on orchestrator in unattended mode using command prompt. I am able to trigger the process but it’s being triggered in attended mode. This orchestrator is on VDI. While I keep it on its being executed but while I disconnected it does trigger but can’t run UI based automation. My use case I I have written an vb script in Outlook which receiving on a specific mail calls command prompt and executes command to run process on orchestrator. I want to choose unattended robot how could I do that ?

Hi @Manish_Chhipa, welcome to the Community.

Give the following syntax a try:

Dim shell
Set shell = CreateObject(“WScript.Shell”)
shell.Run "cmd /c UiRobot.exe -file ““C:\Users\username\Documents\UiPath\MyProcess.xaml”” -input ““Param1=Value1,Param2=Value2"” -executor”, 0, True
Set shell = Nothing

Hope this helps,
Best Regards.

1 Like

@Manish_Chhipa

Welcome to the community

So to make you understand things…

You can access cmd prompt when you actually login…else you cannot…so basically if you are triggering through orchestrator then you are not even logging in there is nothing open on the vm…that is what is unattended…

And when you wnat the system to be active …passively speaking already you violated the rule of unattended automation if having the system logged off before bot runs…

And I am unsure why you want to do it only theough cmd…rather have a integration service on mail and trigger the bot when email is received…that way its triggered when mail comes in and it would be a unattended run

Rather you can call an orchestrator api to start a job on specific system as well

Hope this helps

Cheers

@Anil_G Thank you so much for your response. I didn’t find any such integration. Could you please share some link on this? I don’t want my bot to be busy or on scheduled basis. It must only trigger as soon as it arrives. I was following this link where one guy has mentioned the vb script way in Outlook. I didn’t find any apari from it. https://forum.uipath.com/t/trigger-a-process-when-mail-arrives/6
Pleas share if you have any better way.

Hi @arjunshenoy thank you so much for responding. I want to execute the orchestrator process not the local file. Could you please share some for orchestrator process to trigger but condition is it should be in unattended way.

Hi @Manish_Chhipa,

Here are the steps you can follow:

  1. Make sure you have an unattended robot provisioned in Orchestrator and it is connected to the machine where you want to trigger the process.
  2. In the command prompt, navigate to the UiPath installation folder and then to the UiPath folder. For example, “cd C:\Program Files (x86)\UiPath\Studio\UiPath”.
  3. Use the following command to trigger the process in unattended mode:

UiRobot.exe -file "<full_path_of_xaml_file>" -input "<input_arguments>" -executor -monitored

Here, replace the <full_path_of_xaml_file> with the full path of the XAML file you want to execute, and <input_arguments> with any input arguments that the process requires.

For example, the command may look like this:

UiRobot.exe -file "C:\Users\UserName\Documents\UiPath\Main.xaml" -input "{\"Argument1\":\"value1\",\"Argument2\":\"value2\"}" -executor -monitored

  1. Once you run the command, the process will be triggered in unattended mode on the specified robot.

Note: In unattended mode, the process cannot interact with the UI, so you need to make sure that your process does not require any UI interaction. Also, make sure that your robot is properly provisioned and licensed for unattended automation.

I hope this helps!

1 Like

Hi @ABHIMANYU_THITE1 I am little bit confused here so UI interaction means no human intervention right ? Or is it like I can’t run anything like scraping things from website. Because scraping thing from website was working fine in an unattended mode previously the same process but we used orchestrator folder and process I’d command instead of xaml there. So the it started running in an attended mode. And whenever we disconnect vdi it just triggers and fails. But previously the same thing on schedule basis was working fine.

Appreciate the response will surely try xaml file command.

Regards,
Manish

@Manish_Chhipa

Please check this

https://docs.uipath.com/integrations

Using integration service in UiPath…you can connect your mail and create trigger on mail arrival

Hope this helps

cheers

1 Like

Hi @arjunshenoy @ABHIMANYU_THITE1 Thank you guys for your responses but it didn’t work in an unattended mode I guess cmd works itself in attended mode. I tried triggering file also the orchestrator process for file it got triggered but in attended mode and for second it didn’t even get triggered. @Anil_G our UiPath is not hosted on cloud so that’s also not an option for us to go. But that was good to know. Now I am going by the way which I didn’t want triggering the process in every five minutes and check if mail has arrived if not just come out of the flow.

@nisargkadam23 can you please help here if there are any insights ?