robot
2023.10
false
UiPath logo, featuring letters U and I in white
Robot User Guide
Last updated Oct 25, 2024

Command Line Interface

The Robot Command Line Interface (UiRobot.exe) is a console application which can request to start jobs, and waits for their output. It is a direct client of the Robot service, and communication is done through a WCF channel.

To make use of the command line arguments supported by Robots, make sure that the UiPath® Robot service is running. If not, start it from the Services Microsoft Management Console snap-in.

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\UiPath\Studio.

All the examples displayed in the Arguments Description chapter are constructed from the assumption that you performed this action.

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 command:

cd C:\Program Files\UiPath\Studio.

All the examples displayed here are constructed from the assumption that you first executed the command above.

Attended Robots should only run under human supervision.

The Execute Command

  • UiRobot.exe execute [--process <Package_ID> | --file <File_Path>] [--folder <Orchestrator_Folder_ID>] [--input <Input_Parameters>]
This command is used to start the execution of a process or a file (.json, .xaml, or .nupkg). Please note that the --process (-p) and --file (-f) arguments can not be simultaneously used with the execute command. It supports the following arguments:
Note: Starting with v2023.4, the process list is refreshed in parallel with the process execution, prior to this, the process list was refreshed before the process started. This means that when running a process for which an update is available, the job might run with the older version of the process.

Argument

Description

-p--process <Package_ID>

Mandatory. Starts the execution of a local or Orchestrator process.

Examples:

  • UiRobot.exe execute --process UiPathDemoProcess
  • UiRobot.exe execute -p UiPathDemoProcess
-f--file <File_Path>

Mandatory. Starts the execution of a local project file. The target file can be .json, .xaml, or .nupkg.

Examples:

  • 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"
--folder <Orchestrator_Folder_ID>

Optional. Allows you to specify the Orchestrator folder from which to install and execute the target process. It can only be used together with the --process argument.

Example:

  • UiRobot.exe -Execute --process UiPathDemoProcess --folder OrchFolder1
--input <Input_Parameters>

Optional. Allows you to specify input arguments for execution. It can be used with the --process or --file arguments.

Examples:

  • UiRobot.exe execute --process UiPathDemoProcess --input "{'inArg' : 'value' , 'Integer' : 3}"
  • UiRobot.exe execute --process UiPathDemoProcess --folder OrchFolder1 --input "{'inArg' : 'value' , 'Integer' : 3}"
  • UiRobot.exe execute --file "C:\UiPath\Automation\Main.xaml" --input "{'inArg' : 'value' , 'Integer' : 3}"
--entry <entrypoint>

Allows you to select the entry point of a process when starting it via the command line.

Example:

  • UiRobot execute --file "C:\UiPath\Project\project.1.0.3.nupkg" --input "{'inArg':'value','integer':3}" --entry "OtherEntryPoint.xaml"
Important: The following commands are not supported for Windows or Portable projects:
  • UiRobot.exe execute --file "C:\UiPath\Automation\Main.xaml"UiRobot.exe execute --file "C:\UiPath\Automation\Main.xaml"
  • UiRobot.exe execute --file "C:\UiPath\Automation\Project.json"UiRobot.exe execute --file "C:\UiPath\Automation\Project.json"

The Install Process Command

  • UiRobot.exe installprocess [--process-name <process_name>] [--folder <orchestrator_folder>]
The installprocess command is used to install a process. When the robot is connected to Orchestrator, the robot only looks for the process in the Orchestrator feed. When the robot is not connected to Orchestrator, the local feed is used.

The following arguments are supported:

ArgumentDescription
--process-name <process_name>Mandatory. The name of the process to be installed.

Example:

  • UiRobot installprocess --process-name MyProcess
--folder <orchestrator_folder>Optional. The name of the Orchestrator folder in which the process to be installed is found. This argument can only be used when the robot is connected to Orchestrator. If the process to be installed is found in only one folder, the parameter is not needed.
Example:
  • UiRobot installprocess -p MyProcess --folder MyOrchestratorFolder

The Pack Command

Note: For Studio v2018.4.4 and later releases we recommend publishing using the command UiPath.Studio.CommandLine.exe publish instead of UiRobot.exe pack. For more information, see Mass Update Command Line Parameters in the Studio guide.
  • UiRobot.exe pack <Project_Path> --output <Destination_Folder> [-v <Project_Version>]
This command is used to pack a Project.json file into a .nupkg file. It supports the following arguments:
ArgumentDescription

-o

--output <Destination_Folder>

Mandatory. Allows you to specify where the .nupkg file is created.

Example:

  • UiRobot.exe pack "C:\UiPath\Automation\Project.json" --output "C:\UiPath\Automation\Packages"

-v <Project_Version>

Optional. Allows you to specify a version for the .nupkg file.

Example:

  • UiRobot.exe pack "C:\UiPath\Automation\Project.json" --output "C:\UiPath\Automation\Packages" -v 1.0.6820.22047

The Connect Command

  • UiRobot.exe connect [--url <Orchestrator_Server_URL> --key <Machine_Key>] | [--connectionString <Connection_String>]

    Note: If the Robot is already connected, running the connect command returns the following message: Orchestrator already connected!.

This command is used to connect the Robot to an Orchestrator instance. It supports the following arguments:

Argument

Description

connect

Used to connect the robot to Orchestrator, must be used with the --url, --key, or --clientID --clientSecret arguments. If the arguments are not specified, the Orchestrator configuration in Assistant is used to establish the connection.

Example:

  • UiRobot.exe connect

Machine Key example:

  • UiRobot.exe connect --url https://demo.uipath.com/ --key 1122AAB3C-DD44-ABCD-1234-7788GG99HH00

Client ID and Client Secret example:

  • UiRobot.exe connect --url https://demo.uipath.com/ --clientID 696CCA0C-1234-ABCD-1234-F65BBC2F15DE --clientSecret QJX!jv12345A4q4N

The Disconnect Command

This command is used to disconnect the Robot from the current Orchestrator instance.

ArgumentDescription
UiRobot.exe disconnect

Disconnect the Robot from Orchestrator. This command only works if there are no running jobs on the robot machine.

UiRobot.exe disconnect --forceDisconnect the Robot from Orchestrator. If there is a job runnig on the machine, the job gets killed and only afterwards the robot is disconnected
UiRobot.exe disconnect --waitDisconnect the Robot from Orchestrator. If there is a job runnig on the machine, the robot is disconnected only after the job completes.

The Trace Command

  • UiRobot.exe trace --enableLowLevel | --disableLowLevel

This command is used to enable or disable low-level (verbose) tracing for the Robot. It supports the following arguments:

Argument

Description

--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 trace --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 trace --disableLowLevel

The PiP Command

Allows you to enable or disable the Picture in Picture functionality on the machine. This setting is applied on the local machine and affects all users and is used for modifying existing installations.

Administrator rights are required to execute these commands.

Command

Description

PiP --enable

Enables the Picture in Picture functionality of the machine.

PiP --disable

Disables the Picture in Picture functionality of the machine.

The ENABLE_PIP Command

Allows you to enable the Picture in Picture functionality of the machine during the UiPath® command-line installation.

Command

Description

ENABLE_PIP=1

Enables the Picture in Picture functionality of the machine.

ENABLE_PIP=0

Does not enable the Picture in Picture functionality of the machine.

Miscellaneous Commands

The following commands are purely informative and have no impact on your automation projects whatsoever:

Argument

Description

--version

Displays information about the Robot version.

--help

Displays the list of supported commands, as well as corresponding information and examples.

flushlogs [--timeout <timeout_in_seconds>]

Sends all pending logs to Orchestrator.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.