Run Uipath Workflow with .bat file

Hii ,I’m New for UiPath studio ,and installed UiPath community edition 2023.4.0
I want run UiPath workflow using bat file .
for that I design basic workflow ,display message ,use message box activity and save workflow .
then create text file and save UiPath studio .exe file path and main workflow file in txt file and save as this as .bat file
following path is store in bat file
“C:\Users\ABC\AppData\Local\Programs\UiPath\Studio\UiPath.Studio.exe” execute --file “C:\Users\ABC\Documents\UiPath\UipathBatchFile\Main.xaml”
when I double click on bat file ,only UiPath studio will be open,and workflow is not run
please guide me to resolve my issue.

HEy,

To run the process you need pass the path till UiRobot.exe and not studio
C:\Program Files (x86)\UiPath Studio\UiRobot.exe”

Verify the location in your system and try.

Thanks

@prateek.mehandiratta9 where i found UipathRobot.exe location?
How to find?

Hey, You are using which Windows (10 or 11) and 32 bit or 64 bit ?

@prateek.mehandiratta9 Windows 10 (64 bit)

Hi,

If your project is Windows, it’s necessary to publish to nupkg in advance.
Then can you try to run as the following.

C:\Users\USERNAME\AppData\Local\Programs\UiPath\Studio\UiRobot.exe execute --file UipathBatchFile.1.0.1.nupkg

Regards,

Refer this thread:

UiRobot.exe Path in Community Edition? - Help - UiPath Community Forum

but where found UipathRobot.exe file path

“C:\Users\username\AppData\Local\Programs\UiPath\Studio”

App data folder might be hidden

it’s not UiPathRobot.exe but UiRobot.exe in C:\Users\USERNAME\AppData\Local\Programs\UiPath\Studio\

Can you check the above?

Regards,

Yes, that was a typo from my end.

found UipathRobot.exe ,chenge path but when i double click on bat file workflow is not run just blink on screen but not run @prateek.mehandiratta9 @Yoichi

Are you using Community or Enterprise Edition of UiPath studio ?

If you are using Community Edition then upgrade to latest version to schedule Attended BOTS. No need of any Windows scheduler and all. Could you please check below thread to know more about this.

Hey Could you try running any of the below: Your json, nupkg or main.xaml

  • UiRobot.exe execute --file “C:\UiPath\Automation\Project.json”

  • UiRobot.exe execute --file “C:\UiPath\Automation\Main.xaml”

  • UiRobot.exe execute --file “C:\UiPath\Automation\Notepad.1.0.6682.21636.nupkg”

HI,

Can you try to add pause at the end of the batch file, then check if there is message when run?

Regards,

@Yoichi add pause in file and save as .bat file .
double click on file then display following
You can only run .NET6 .nupkg files or published process from the UiRobot command line.

Hey,

Publish your project to a local folder and then run the nupkg file:

  • UiRobot.exe execute --file “C:\UiPath\Automation\xyz.nupkg”

Hi,

As I mentioned in previous post, it’s necessary to publish your project to nupkg file in advance, then run as the above command. Can you try this?

Regards,

1 Like

@prateek.mehandiratta9 @Yoichi @debojyoti_ghosh Thank you so much Guy’s ,Issue resolved

1 Like