Run UiPath Roboter with Script (VBA / CMD)

Hey guys,

I have created a workflow and “published” it afterwards. When I run the UIPath Robot it lists the mentioned package and I can download and run it from there.

Is it possible to run the package with a vba or cmd script after I downloaded it once?


For normal .xaml files / workflows I am using scripts like this which works perfectly:

Dim oShell
Set oShell = CreateObject (“WScript.Shell”) "cmd /K CD C:\Program Files (x86)\UiPath\Studio\ & UiRobot -file ““C:\Users\XXXXXXXX\WindowsCredential.xaml”” "
Set oShell = Nothing

But in this case it is important that it has to go through packages, because the enduser is not allowed to open the files with uipathstudio!

I would ask for your help here.

Important: I dont have Orchestrator! Therefore, I want to use a script and not just open the UIPath Robot and run the package manual.

Best Regards,

the “package” is in fact an ordinary ZIP. Therefore you need to unzip it somewhere and then run like you used to.


1 Like

Hey J0ska,

thanks for ur response!
I already tryed ur solution / hint but the problem is that the enduser can just simple double click the extracted .xaml file and can open it with uipathstudio.

And exactly this I want to prevent.

Is there any other workaround?

Best regards,

Could you just run a script which would unzip → launch → delete?
So the user will not see the xaml.


1 Like

So you mean that I add an unzip and delete script into mine existing one?

Any other ideas?

Thanks, regards!

I suppose it is the only way. Robot is actually doing the same, it is also unpacking the package before execution.


1 Like

But when the Robot is doing the same why I am not able to trigger it through an script / bat ? I mean script which trigger the Robot to start the package, like when I am clicking on it.

This would help alot, because the Robot saves the file in a more complex path and that would be enough for me.

I guess these tasks (unpacking etc.) are done by UiPath.Executor.exe which is then launching UiRobot.exe like you do in your script.

1 Like

Ok this means that I could write a script which triggers the UiPath.Executor.exe to unpack the nupkg to get the xaml file, could move it to a temp folder and then use the normal script to execute the xaml file from the temp folder :smiley:

edit: but I actually dont get it why there is no other workaround to just simply run the package from cmd through UIPath Robot :frowning:

I would rather use own script for all - see attached.

What it does:
1/ look into .packages if new package with name ProcessID* exists
2/ if YES it will expand it into .processes folder replacing any existing process of same ID and archive the package
3/ launch process from .processes folder

Feel free to adjust as needed (1014 Bytes)

1 Like

Thanks J0ska for ur several hints!

But I will most likely do it with these steps:

  1. create package through publishing
  2. copy package to the device where it has to be executed
  3. use script to run the nupkg file

this makes sure that everything works and the user can not open the nupkg file with double click on it or uipathstudio… yes he can open it with uipathstudio but he will not see anything.

To make sure… there is still one way that he could get the raw data but yea to be 100% sure u need the Orchestrator.

Thanks alot for your help,

best regards

I just found that UiRobot could actually run the package right away. Not tested.

Execution commands:
-file <file_path> [-input <input_params>] [–rdp]
-f,-file Workflow execution file
-i,-input Dictionary of input parameters in JSON format
–rdp Create interactive Windows session using RDP
UiRobot -file “C:\UiPath\Project\Main.xaml”
UiRobot -file “C:\UiPath\Project\Main.xaml” -input “{‘inArg’:‘value’}” --rdp
UiRobot -file “C:\UiPath\Project\project.json”
UiRobot -file "C:\UiPath\Package\Notepad.1.0.6682.21636.nupkg"

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.