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

--restart

Restart the UiPath Robot as a Windows service. Administrator rights are required.
Example:
UiRobot.exe --restart

--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"

-i, -input

Enables you to attribute custom values to In or In\Out arguments, in JSON format, when executing workflows. Can only be with the -file or -f command.
Example:
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.’}”

--monitor

Monitors the current Windows session and helps you prevent disconnecting events such as locking the screen. Can only be used with the -file command.

--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.



Arguments Description


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.