Start a workflow from the command prompt as a front Office robot

robot
cmd_arguments

#1

I have a batch file with this content: “C:\Program Files (x86)\UiPath Studio\UiRobot.exe” \file: “C:\Users\testrobot\Documents\UiPath\Projects\StartFromCmd\Main.xaml” The program will start the Robot exe, but the Main.xaml will not open. What can I do? Is there a solution to start the workflow?

Thanks,
Michael


#2

Hello!

Try to follow this guide and let me know if works.

Regards,


#3

@bozon, try this:
“C:\Program Files (x86)\UiPath Studio\UiRobot.exe” /file: “C:\Users\testrobot\Documents\UiPath\Projects\StartFromCmd\Main.xaml”

The “file:” argument must be preceded by a slash ("/"), not a backslash ("\"). It’s easy enough to miss even if you stare at it for a while … :slight_smile:

(This info is also in the link @Lucas.Pimenta provided)
Regards,
burque505


#4

Hi,

thank you for your answer. I tried this before without any success. It was not a difference in the behavior. If I use a backslash, the Robot exe is starting, but not the Main.xaml file.

Mit freundlichen Grüßen/Best regards
Michael Boeckenhauer


#5

Dear Lucas,

That’s the same syntax that I tried. The result is always: the Robot Exe starts the robot but not the workflow.


#6

Hello!

Have you checked if the workflow have errors? When we start a workflow through command prompt, if it fails, it’s doesn’t show anything on screen.

Try to execute from Uipath Studio and see if works.

Regards,


#7

Dear Lucas,

Yes, I tried this. The workflow is running fine from UI Path Studio.

Best regards,

Michael


#8

Hello!

Give a shot with the method mentioned by @acaciomelo on this another topic just to see if works.


#9

Dear Lucas,

what a fantastic guide! Thanks alot. I tested it immediately. It works great!

Many thanks for the support, that helps me a lot.

best regards,

Michael


#10

Deleted … Lucas answered it :slight_smile:


#11

@ Lucas,

Hello,

Could you please elaborate the steps again? What do you mean by “Create a shortcut using Run feature inside windows”?

I tried to create a shortcut for the windows “Run”, but I am unable to change the settings in “Properties” as it does not read it as a “.bat” shortcut, instead reads it as target Type “Run”

Regards,
Amritesh


#12

I also tried to rename the “Run” to “Run.bat”, still doesn’t work


#13

Hello,

try this:

regards

Michael


#14

Hello!

Give a shot with the method mentioned by acaciomelo on this another topic just to see if works.
[https://discourse-cdn-sjc1.com/business5/user_avatar/forum.uipath.com/acaciomelo/40/6396_1.png]Scheduling a back office robot using task schedulerhttps://forum.uipath.com/t/scheduling-a-back-office-robot-using-task-scheduler/10105/13

Hi @mudithttps://forum.uipath.com/u/mudit, Please try to follow the steps below: Create a .bat file like the one attached and set the parameters if necessary inside it Create a shortcut by using the Run feature inside windows Schedule it in Task Scheduler to execute this shortcut at certain moments and start your robot Both .bat file and the Run shortcut should be at the same folder of the robot. Run.ziphttps://discourse-cdn-sjc1.com/business5/uploads/uipath/original/2X/3/3c3959d46ed013737f0ff05b493af3420187399c.zip (271 Bytes) [image] Copy it to your folder and change its properties like: [image]https://discourse-cdn-sjc1.com/business5/uploads/uipath/original/2X/0/0aa25350cf9947e6ccbcde957fe627994455f3c0.png In task scheduler, just call it: …


#15

Hello Michael,

My question is about this procedure itself.

When you say “Create a shortcut by using the Run feature in Windows”, what do you exactly mean.

I downloaded the zip file which has the “Run.bat”. Saved/Unzipped it in the path Downloads/Run

So now this folder has the file “Run.bat” which I edited and provided the paths that I needed to.

Now you say that I need to create a shortcut of “Run” and paste it in the same folder (Download/Run/). Did that. But on trying to edit the “Shortcuts” in “Properties”, it doesn’t allow me to edit it.

Target Type is mentioned as "Run…"
Looking at the screenshot, the target type should be Windows Batch file.

I tried to rename this to Run.bat but it still shows the same Target type.

Regards,
Amritesh


#16

Hello Amritesh,

try this: Scheduling a back office robot using task scheduler

Step by step and then open the windows Task Planning tool to configure the scheduled date and time, then link to your Batch file.

Kind regards,

Michael


#17

Hello!

You don’t need to create a shortcut of “Run.bat”. You just have to put it on the same folder as your Main.xaml workflow. Once it done, create a Task on Windows Task Scheduler and then set to execute the “Run.bat” as Action and your date/time as a Trigger.

Hope it Helps!

:smiley: