UiPath Documentation
robot
2025.10
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

机器人管理员指南

上次更新日期 2026年4月6日

机器人执行程序

UiPath 执行程序是 UiPath 软件结构的服务组件,用于运行自动化任务或作业。它是实际执行自动化工作流的组件,您可以在系统服务列表中将其标为UiPath.Executor.exe

工作方式

在自动化生命周期中,执行程序代表执行阶段:

  1. 设计阶段——在 Studio 中设计和创建自动化工作流后,系统就会将其发布到 Orchestrator。
  2. Orchestrator 阶段—Orchestrator 是管理、控制和记录机器人所执行操作的组件。 在这里,您可以安排作业时间或按需运行作业。
  3. 执行阶段——安排或触发任务后,Orchestrator 会向 UiPath 机器人服务发送命令。然后,机器人服务会启动 UiPath Executor 实例以运行自动化任务。 每个实例均在隔离会话中运行,这样可确保:即便一项任务失败,其他任务也不会受到影响。
  4. 执行后阶段——任务完成时,执行程序实例终止,结果发回 Orchestrator。执行时间、状态(成功或失败)以及任何异常等详细信息均记录下来,并可用于分析以便排除故障或改进流程。

功能

执行程序的部分功能包括:

  • 执行本地或远程任务——UiPath 执行程序既可以在安装了 UiPath 机器人服务的本地设备中执行任务,也可以远程连接到其他设备并在这些设备上执行任务。
  • 并发运行作业——执行程序能够同时执行多项自动化任务,每项自动化任务都作为独立的会话运行。
  • 负载均衡和任务优先级——执行程序可以与 UiPath Orchestrator 共同有助于平衡多台机器人之间的自动化负载,并根据预定义的规则确定任务的优先级。
  • 维护工作流独立——执行程序中的每次执行都是独立的。这意味着一项作业中的错误或失败不会影响其余作业。
    备注:

    执行程序可自适应不同的 DPI 设置,使工作流能够在任何分辨率下运行。如果某些应用程序无法处理 DPI,那么您可以禁用此特定功能。

基于自动化项目的执行程序类型

UniPath 机器人服务会根据自动化项目推出旨在执行自动化的相关执行程序类型。下列表格总结执行程序可以运行的项目类型,具体取决于所使用的目标框架。

项目/执行程序类型架构支持的操作系统使用的框架
Windows - 旧版32 位Windows(x64 和 x86).NET Framework 4.6.1
Windows64 位Windows x64支持 Windows 的 .NET 8 (.NET Core - Windows)
跨平台64 位Windows、Linux、MacOS(64 位)跨平台支持的 .NET 8 (.NET Core)

表格中的各行代表不同的执行程序类型,显示如何为了运行项目而根据项目类型、目标操作系统和所用 .NET Framework 版本的特定要求来配置执行程序。这些信息有助于了解哪款执行程序适合哪个项目,确保与目标环境的兼容性,并利用相关框架功能。

执行程序的用户配置

执行程序有专用系统变量UIPATH_HEADLESS_WITH_USER。您可以根据运行自动化的用户的类型和计算机上安装的机器人的版本配置该变量。

当用户是本地系统时,您可以使用 Robot 2021.10 或更高版本运行后台自动化任务。在这里,UIPATH_HEADLESS_WITH_USER的设置应要么是False,要么根本不设置。

当运行自动化的用户具有在 Orchestrator 中指定的凭据时,您应考虑以下三种情况:

  • 对于运行后台自动化任务的任何版本机器人,UIPATH_HEADLESS_WITH_USER设置应为True
  • 对于运行前台自动化的机器人任何版本,均不应设置UIPATH_HEADLESS_WITH_USER变量。
  • 对于使用 Robot 2021.4 或更低版本的前台和后台自动化,均不应设置UIPATH_HEADLESS_WITH_USER变量。

下表总结执行程序的用户条件。

用户类型

自动化类型

UIPATH_HEADLESS_WITH_USER 设置

使用此配置的机器人版本

本地系统用户

后台

False 或为空

2021.10 及更高版本

在 Orchestrator 中配置的用户

后台

True

所有版本

前台

不需要变量

所有版本

任何

不需要变量

2021.4 及更早版本

预加载的执行程序

通常,每个流程均需要一段时间将所需的工作流、包和库加载到内存中才能开始处理。在预加载设置中,这些依赖项已经加载到内存的专用执行槽位中。预加载的执行程序默认处于启用状态。

以下是有关已预加载执行程序的一些关键详细信息:

  • 更快速的执行:通过预加载流程,您的机器人可以更快地开始执行任务。
  • 资源利用率:借助预加载的执行程序,由于已经在内存中加载了所需的流程,因此机器人消耗的资源更少。
  • 可用性:预加载的执行程序主要用于从 Assistant、RobotJS、Studio 或命令行接口开始的 Attended 自动化。Orchestrator 中的 Unattended 作业会启动一个未预加载的执行程序。

用于预加载设置的系统变量

您可以通过在机器人计算机上设置特定环境变量来管理预加载执行程序的行为,如下所示:

环境变量描述
UIPATH_PRE_LOADED_EXECUTOR覆盖默认行为,仅在第一项作业开始时启动预加载的执行程序。
UIPATH_DISABLE_PRE_LOADED_EXECUTORTrue禁用预加载的执行程序。

工作方式

UIPATH_PRE_LOADED_EXECUTOR变量添加到系统时,就是配置预加载的设置。 此操作会启动两套执行程序:一套是在作业开始时启动;另一套等待未来作业,即其为预加载的执行程序。 当另一项作业开始时,它会使用预加载的执行程序,并生成另一个预加载的执行程序以等待下一项作业。 简而言之,预加载设置始终确保有可用的执行程序等待作业。

预加载的执行程序和操作系统

对于 Windows 设备,UiPath.Service.UserHost.exe启动时会启动两套预加载的执行程序:一套用于 Windows 项目,另一套用于 Windows-Legacy 项目。

对于 MacOS 设备,UiPath.Service.UserHost.exe启动时,它会为跨平台项目启动一款预加载的执行程序。

Medium+ integrity elevation

Some Windows applications run at a higher integrity level than the standard user session. One common example is the Windows CredentialBroker dialog, which appears when you enter a username and password to connect to a Remote Desktop (RDP) session. Because the CredentialBroker runs at Medium+ integrity, the Executor cannot interact with it by default, and your automation fails to type credentials into the dialog.

To enable the Executor to automate such windows, set the UIPATH_MEDIUMPLUS_EXECUTOR environment variable to any non-empty value on the robot machine. When this variable is set, the Robot Service launches the Executor at the Medium+ integrity level, allowing it to interact with windows that would otherwise be inaccessible.

要求

  • Windows only — this feature is not available on Linux or macOS.
  • UAC must be enabled — the elevation relies on User Account Control being active on the machine. If UAC is disabled, the variable is ignored and the Executor starts at the default integrity level.
  • Installation mode — the Robot must be installed either in service mode or in user mode with a per-machine installation (installed in Program Files). Per-user installations do not support Medium+ elevation.
  • Attended automations — the variable can be set as either a user or machine (system) environment variable.
  • Unattended automations — the variable must be set as a machine (system) environment variable.

如何启用

  1. Open System Properties > Environment Variables on the robot machine.
  2. For attended automations, you can add the variable under either User variables or System variables. For unattended automations, add it under System variables.
  3. Select New.
  4. Set the variable name to UIPATH_MEDIUMPLUS_EXECUTOR and the value to 1.
  5. Select OK to save the variable.
  6. Restart the Robot Service for the change to take effect.

结果

After enabling Medium+ elevation, your automations can interact with the CredentialBroker dialog and other windows that require Medium+ integrity. If the Executor cannot start at the elevated level (for example, because UAC is disabled), it falls back to the default integrity level and logs a warning.

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新