UiPath Robot Guide

Arguments Description

To make it easier for you to work with command line arguments, navigate to the directory in which the Robot is installed using the change directory command. For example, if you did not change the default location of the Robot, you can use the following: cd C:\Program Files (x86)\UiPath\Studio.

All the examples displayed here are constructed from the assumption that you performed this action.

Argument
Description

--help

Displays all the available command line arguments.
Example:
UiRobot.exe --help

--enableLowLevel

Enables low-level tracing. An .etl file is generated, which can be opened with the Event Viewer, to help you with troubleshooting crashes and errors.This enables verbose tracing for the Robot Executor and Service in the Event Viewer.
Example:
UiRobot.exe --enableLowLevel

--disableLowLevel

Disables low-level tracing. An .etl file is generated to the Desktop after you stop it. This file can be opened in the Event Viewer, to help you with troubleshooting crashes and errors.
Example:
UiRobot.exe --disableLowLevel

--connect

If used alone, it opens the UiPath Robot Settings window. It can be used together with the -url and -key commands or with the -connectionString command, to help you connect your Robot to Orchestrator.
Example:
UiRobot.exe --connect

-url

The url of your Orchestrator instance. Can only be used with the --connect and -key commands, after you provision the Robot on Orchestrator.
Example:
UiRobot.exe --connect -url https://platform.uipath.com/ -key ba1e4809-2f64-4965-bae2-efda62d20164

-key

The Machine Key that helps you connect to Orchestrator. Can only be used with the --connect and -url commands, after you provision the Robot on Orchestrator.
Example:
UiRobot.exe --connect -url https://platform.uipath.com/ -key ba1e4809-2f64-4965-bae2-efda62d20164

-connectString

Connect your Robot to Orchestrator using a connection string generated from Orchestrator.
Important! To use the connection string to deploy Robots to Orchestrator, the following are required:

  • the WindowsAuth.Enabled parameter from the web.config file has to be set to true
  • the WindowsAuth.Domain parameter has to be set to a valid domain
  • the Robot machines you want to deploy have to be in the Active Directory domain which was specified in the WindowsAuth.Domain parameter

Example:
UiRobot.exe --connect -connectionString https://platform.uipath.com/api/robotsservice/GetConnectionData?tenantId=1
Note: You still have to deploy the Robot to Orchestrator after performing this action on the Robot machine.

--disconnect

Disconnects the Robot from Orchestrator.
Example:
UiRobot.exe --disconnect

-f, -file

Start executing a specified workflow, in an .xaml, .json, or .nupkg file format. You must specify the entire path between quotation marks. As of 2018.2, workflows started with this command only work if you had published the containing project at least once beforehand and if the associated project.json file is inside the project folder.
Examples:
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"

Note: Attended Robots should only run under human supervision.

-p, -process

Start execution of an available process. The Robot downloads or updates the necessary package, just like starting them from the Robot Agent (Tray). These are the same processes that are visible in the Robot Agent (Tray). You can stop the process execution by using the Ctrl + C hotkey in the active command prompt instance.
Example:
UiRobot.exe -p SpreadsheetData
The process name you want to execute is the one displayed in the Robot Tray.
Note: Attended Robots should only run under human supervision.

-i, -input

Enables you to attribute custom values to In or In\Out arguments, in JSON format, when executing workflows. Arrays and arrays of strings can be used as input arguments. Can only be used with the -file, -f, or -p, -process commands.
Examples:
UiRobot.exe -file “%HOMEPATH%\Documents\UiPath\command_line_test\Main.xaml” -input “{‘InArgument1’: ‘Print this string.’}”

UiRobot.exe -file “%HOMEPATH%\Documents\UiPath\command_line_test\Main.xaml” -i “{‘InOutArgument1’: ‘Print this string.’}”

UiRobot.exe -p inputInt -i \"{'arrayInt':['1','2','3']}"

UiRobot.exe -p inputString -i \"{'arrayString':['1abc','2def','3zzz']}\"

UiRobot.exe -process SpreadsheetData -i “{‘InArgument1’: ‘Print this string.’}”

--rdp

Used together with the -file and --monitor commands, helps you prevent disconnections through the remote desktop protocol.

-pack

Creates a NuGet package from a target workflow. The associated project .json file path needs to be specified (-pack <project_path>), as well as a destination folder (-o <destination_folder>). Example:
UiRobot.exe -pack "C:\UiPath\Projects\Notepad\project.json" -o "C:\UiPath\Packages". This creates the Notepad.VersionNr.nupkg file in the C:\UiPath\Packages folder.
Please note that packing a library first downloads all the necessary dependencies, if required.

-o, -output

Used together with the -pack command to specify the destination folder of the generated .nupkg file. Please note that this argument is mandatory.

-v, -version

Used together with the -pack command to specify the package version. This argument is optional. If not used, the package version is the default one. More info on how a package version is built is available on this page.

--acquireLicense

Acquires an available Robot license from Orchestrator.

--releaseLicense

Releases the Robot license from Orchestrator.