Start from command line


I’m not able to start my robot process from the command line using another user account. I’ve read the instructions here:

Currently I’m starting the process like this:

“C:\Program Files (x86)\UiPath Studio\UiRobot.exe” /file:“C:\Users\UserName\Documents\UiPath\UiPath\Robot\Main.xaml” /executor /monitored

It works fine but the automation starts under the user account that launches the command. According to the instructions I should use the /target argument but I can’t get it to work properly. I’ve tried arguments like


I’ve added both, the domain\UserName as well as UiPath:user=domain\UserName to Windows Credentials. The domain\UserName user also has Log on as batch job privileges.

Does anyone have examples how this should be done?


I was given a solution. You can’t use /executor and /target together because /executor overrides the /target argument. Target should be used like this: /target domain\UserName


@esa.andsten - I am using below command on cmd command prompt - but nothing happens.
Please suggest steps how to invoke this through command line.
Note -I do not have UI Robot.exe . All I have is the Ui Path Studio.exe

“C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\UIPath Studio.exe”/file:“C:\Users\username\Desktop\UIPath\Sample XAML\ArafaRPA.xaml”


I have UI Robot exe installed but I am getting Invalid command line when I run process from cmd. Any help would be appreciated.

You should have UiRobot.exe if you have a working installation. Can you see UiRobot.exe process running in Windows Task Manager when you have UiPathStudio open?

What kind of error message do you get? Is there an error in the Execution.log file? Check folder C:\Users\UserName\AppData\Local\UiPath\Logs

I’m having a similar issue, after issuing the following command:

"C:\Program Files (x86)\UiPath Studio\UiRobot.exe" /file:"C:\Users\Administrator\Documents\UiPath\test1\Main.xaml"

I receive the following error:

Topshelf.HostFactory Error: 0 : An exception occurred creating the host, Topshelf.HostConfigurationException: The service was not properly configured:
[Failure] Command Line An unknown command-line option was found: DEFINE: file = 
[Success] Name UiRobotSvc
[Success] DisplayName UiPath Robot
[Success] Description UiPath Robot Service
[Success] ServiceName UiRobotSvc
at Topshelf.Configurators.ValidateConfigurationResult.CompileResults(IEnumerable`1 results)
at Topshelf.HostFactory.New(Action`1 configureCallback)

The file ‘Main.xaml’ is definitely in that location!

Many thanks for the help.

(Main topic: Starting process from SSH command line)

I had a similar issue where I didn’t have uirobot.exe This was when I upgraded from 2016.2 to 2017.1

The solution was to completely remove uipathstudio (uninstall from control panel and then remove all files from profile etc) as I found the uninstall does not delete everything it should. Once reinstalled, I had all the files. It may not be relevent in your case but thought I should share my experience.

One thing to check is that is the UiRobotSvc service running. It should start automatically but sometimes it might crash and end up in stopped state.

I’m using UiRobot.exe /file:“C:\Users\Documents\UiPath\RunAsCmd\Main.xaml” /input:“{‘arg1’:‘hello’}”.
How can i use the arg1 value inside the workflow ? Is there any specific task to get arg1 value ?

as you can seee

1.path of the ui robot.exe is CORRECT
2.path of the XAML file is CORRECT
3.uirobot service is RUNNING
but stillgetting invalid command line error any help ?

Hi karges,

You have to navigate to the path where UiRobot.exe file is. In you case the commands would be:

  • cd C:\Program Files\UiPath Studio
  • UiRobot.exe -file "C:\users\...\Main.xaml"

tried , still the same “invalid command”
u have given - file instad of /file , which was my way of giving , but tried both ways. still the same.
system is a 32 bit system would it be because of that ?

Actually, it’s -file or -f. I’ve edited above too. You can find more details about command line arguments here:


nono , please do not devetaite the topic. the problem is not command line. that’s what I mentioned. everything is working perfect in some other system. in this system also am able to develop and run in studio but not from commad line.

I know this may seem a silly question but have you checked that is actually where the Robot.exe file is? over the course of some of the recent updates some people have versions where the robot .exe file is located in the UiPath Studio file as you have it above, but in others is can be found in C:\Program Files (x86)\UiPath Platform\UiRobot.exe - the reason i say this is that you have said it works fine in another system, and the robot.exe file may be in the UiPath Studio folder in the other system, but in the UiPath Platform folder in the system you are now trying it in.

yea everything was fine. had a call with ui path team also. but nothing worked. they said this method of calling work flow is not advocated… so we had to drop… !!