- 发行说明
- 入门指南
- UiPath Assistant
- 安装和升级
- 机器人类型
- 机器人组件
- 许可
- 将机器人连接到 Orchestrator
- 流程与活动
- 日志记录
- Robot JavaScript SDK
- 特定场景
- 监管
- 故障排除
机器人命令行接口 (UiRobot.exe) 是一个控制台应用程序,可用于请求启动作业并等待作业输出。作为机器人服务的直接客户端,其可通过 WCF 通道完成通信。
如要使用机器人支持的命令行参数,请确保 UiPath 机器人服务正在运行。否则,请通过 Microsoft 管理控制台管理单元服务启动该服务。
为便于您处理命令行参数,请使用更改目录命令导航至安装机器人的目录。例如,如果您未更改机器人的默认位置,则可使用以下命令: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.
参数说明
为便于您处理命令行参数,请使用更改目录命令导航至安装机器人的目录。例如,如果您未更改机器人的默认位置,则可使用以下命令:
cd C:\Program Files\UiPath\Studio。
此处构建的所有示例均基于以下假设:您已首先执行上述命令。
有人值守机器人只能在人工监督下运行。
执行命令
UiRobot.exe execute [--process <Package_ID> | --file <File_Path>] [--folder <Orchestrator_Folder_ID>] [--input <Input_Parameters>]
此命令用于启动流程或文件(.json、.xaml 或 .nupkg)的执行。请注意,--process (-p) 和 --file (-f) 参数不能与 execute 命令一起使用。它支持以下参数:
| 参数 | 描述 |
|---|---|
|
|
必填。开始执行本地或 Orchestrator 流程。 示例:
|
|
|
Mandatory. Starts the execution of a local project file. The target file can be .json, .xaml, or .nupkg. 示例:
|
|
|
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. 示例:
|
|
|
Optional. Allows you to specify input arguments for execution. It can be used with the --process or --file arguments. 示例:
|
|
|
允许您在通过命令行启动流程时选择流程的入口点。 示例:
|
Windows 或 Portable 项目不支持以下命令:
- UiRobot.exe execute --file "C:\UiPath\Automation\Project.json"
- UiRobot.exe execute --file "C:\UiPath\Automation\Main.xaml"
打包命令
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>]
此命令用于将 Project.json 文件打包成 .nupkg 文件。它支持以下参数:
| 参数 | 描述 |
|---|---|
|
|
必填。用于指定创建 示例:
|
|
|
可选。用于指定 示例:
|
连接命令
-
UiRobot.exe connect [--url <Orchestrator_Server_URL> --key <Machine_Key>] | [--connectionString <Connection_String>]备注:如果已经连接了 Robot,则运行
connect命令将返回以下消息:Orchestrator already connected!。
此命令用于将机器人连接到 Orchestrator 实例。它支持以下参数:
| 参数 | 描述 |
|---|---|
|
|
Used to connect the robot to Orchestrator, must be used with the 示例:
计算机密钥示例:
客户端 ID 和客户端密码示例:
|
断开连接命令
UiRobot.exe disconnect
此命令用于断开机器人与当前 Orchestrator 实例的连接。
追踪命令
UiRobot.exe trace --enableLowLevel | --disableLowLevel
此命令用于启用或禁用机器人的低级别 (Verbose) 追踪。它支持以下参数:
| 参数 | 描述 |
|---|---|
|
|
启用低级别追踪。系统会生成 示例:
|
|
|
禁用低级别追踪。停止此功能后,桌面上将生成一个 示例:
|
PiP 命令
允许您启用或禁用计算器的画中画功能。此设置适用于本地计算机,并且会影响所有用户,并用于修改现有安装。
需要管理员权限才能执行这些命令。
| 命令 | 描述 |
|---|---|
PiP --enable | 启用计算机的画中画功能。 |
PiP --disable | 禁用计算机的画中画功能。 |
ENABLE_PIP 命令
允许您在 UiPath 命令行安装过程中启用计算机的画中画功能。
| 命令 | 描述 |
|---|---|
ENABLE_PIP=1 | 启用计算机的画中画功能。 |
ENABLE_PIP=0 | 不启用计算机的画中画功能。 |
其他命令
以下命令仅用于提供相关信息,对您的自动化项目没有任何影响:
| 参数 | 描述 |
|---|---|
--version | 显示机器人版本的相关信息。 |
--help | 显示受支持命令的列表,以及相应的信息和示例。 |
logs --flush | 将所有待处理的日志发送到 Orchestrator。 |