UiPath Documentation
orchestrator
latest
false
Orchestrator 用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

自动更新客户端组件

从 Orchestrator 集中位置将 Robot、Studio 和 UiPath Assistant 客户端更新到较新版本。

关于

此功能允许管理员从 Orchestrator 将 Robot、Studio 和 UiPath™ Assistant 客户端更新到较新版本。这提供了一种从集中位置向大量计算机交付版本更新的简单方法,从而帮助消除用户的烦恼并简化更新过程。

备注:

“自动更新客户端组件”功能仅适用于将已安装的 Robot、Studio 和 UiPath Assistant 产品更新为更高版本的情况。如果需要版本降级,则必须手动或使用独立于 UiPath 的工具完成降级流程。

先决条件

  1. Orchestrator、Studio 和 Robot 2021.10 或更高版本。
  2. 客户端计算机上安装了 Studio 和/或 Robot 2021.10 或更高版本,并且已连接到 Orchestrator。
    备注:

    要启用 Robot 的“自动更新客户端组件”功能,您必须使用版本为 2021.10 或以上的UiPathStudio.msi安装程序或版本为 2024.10 或以上的UiPathRobot.msi安装程序安装 Robot 应用程序。2024.10 之前的UiPathRobot.msi安装程序版本不支持自动更新客户端组件。如果已使用 2024.10 之前的UiPathRobot.msi安装程序版本安装了 Robot,则可以使用 2024.10 或更高版本的UiPathRobot.msi安装程序手动更新 Robot 应用程序。

更新过程中涉及的组件

客户端
  • 客户端应用程序:
    • Robot (机器人)
    • Assistant
    • Studio
  • 机器人服务
  • 更新代理 - 一个 Windows 进程,负责用户和更新服务之间的通信。 (仅在用户模式和有人值守的机器人安装中存在)
  • 更新服务 - 负责客户端计算机和更新服务器之间的通信的 Windows 服务。
服务器端
  • Orchestrator:为管理员提供用户界面,以设置自动更新策略并查看客户端应用程序的版本状态。
  • 更新服务器:一个集中式服务,用于管理自动更新策略并通过更新服务维护与客户端计算机的通信。

工作原理

作为管理员,您可以选择要在特定计算机上部署的特定版本。

为此,在安装 Studio 和 Robot 时,还会将两个可执行文件添加到计算机中:UiPath.UpdateService.Worker.exeUiPath.UpdateService.Agent.exe

根据 Studio/Robot 安装的类型,它们的安装方式不同:

  • Unattended Robot:UiPath.UpdateService.Worker.exe 已安装为 Windows 服务,但未安装 UiPath.UpdateService.Agent.exe
  • Attended Robot:UiPath.UpdateService.Worker.exe 已安装为 Windows 服务,而 UiPath.UpdateService.Agent.exe 在任务计划程序中作为登录任务安装。
  • 快速安装(用户模式):UiPath.UpdateService.Worker.exeUiPath.UpdateService.Agent.exe 在任务计划程序中作为登录任务安装。
    重要提示:

    在计算机上以有人值守的用户模式安装 UiPath Studio 和机器人时,为了使更新服务连接到更新服务器,请确保在安装过程中添加 Orchestrator URL。 如果在安装期间未添加 Orchestrator URL,则在计算机上具有管理员权限的用户必须登录计算机并将机器人连接到 Orchestrator。

定义新策略或更改策略后,更新服务器会向客户端计算机上的更新服务发送一个命令,该命令会询问客户端应用程序是否准备好开始更新过程。

要准备好接收更新,产品必须处于中性状态:

  • Studio - 无正在运行的流程或活动会话。
  • Robot - 无正在运行的作业或流程。
  • Assistant - 无正在运行的流程或待处理活动(正在安装或下载流程)。
    备注:

    在更新过程中,在更新完成之前,机器人不会启动任何作业。

在有人值守场景中,系统会显示更新提示,为用户提供两个选项:

  • Update Now- 停止所有正在运行的作业并关闭该计算机上的所有 Studio 实例,然后继续更新。
  • Later- 使通知静音,可以通过转到系统托盘中的用户界面图标并单击“检查更新”来继续更新过程。

当用户接受提示时,系统会将确认消息发送到更新服务,并启动更新流程。 如果自首次通知后 24 小时内未提供响应,则系统将自动安装更新。

在无人值守场景中,更新服务会确认客户端应用程序是否处于中性状态(如上所述),然后再将确认发送回更新服务器。

备注:
  • 如果计算机上正在运行任何流程,则系统会提示机器人用户停止该流程或等待该流程完成,然后再继续更新。如果 Studio 会话已打开,则系统会要求机器人用户保存进度。
  • 如果机器人用户未及时响应,则 Studio 将关闭,并在此时按原样保存流程。该流程可以在更新完成后恢复。
  • 更新时所有处于活动状态的机器人都将进入维护模式,以确保它们在更新完成之前不会执行任何新作业。
  • 对于用户模式机器人,最长等待时间为 1,440 分钟。
更新过程步骤

更新过程分为七个阶段:

  1. 正在下载
    • 更新服务每三个小时检查一次更新服务器是否有更新请求。 如果收到更新请求,则更新流程将启动下载流程。 如果下载过程已成功启动,则更新请求将添加到更新服务器数据库中,状态为Downloading
  2. 已下载
    • Downloaded状态充当标记,以便更新服务可以启动后处理阶段。此状态表示已成功下载更新文件。
  3. 正在处理
    • 此步骤将对下载的文件进行后处理。在此步骤中,将检查文件,如果没有出现错误,则安装过程将启动。
  4. 准备安装
    • 更新代理会通知用户正在等待安装更新,并请求批准或检查客户端应用程序是否已准备好接收更新。
  5. 已批准安装
    • 一旦更新服务收到批准,便开始实际安装。
  6. 正在安装
    • 新版本将安装到计算机上,并保持与先前版本相同的设置。
  7. 成功/错误

根据安装结果,更新状态会重新报告给更新服务器。

备注:

如果机器人计算机上已安装Chrome 扩展程序,则自动更新功能也会对其进行更新。否则,必须手动安装扩展程序。

重试机制

在更新过程中,如果在首次下载中无法检索到文件,则更新服务将再重试三次。重试间隔为:首次尝试后一小时,然后在第一次重试后两个小时,以及最后一次重试后四个小时。在每次重试之前,都会通过通知系统通知用户。

每次尝试下载时,系统会将日志添加到 Orchestrator 更新日志中,并添加到计算机本地的 %localappdata%/Uipath/UpdateService/logs 文件中。

该过程与安装类似,这意味着如果第一次安装失败,更新服务将以相同的频率(首次尝试后一小时,第一次重试后两小时,以及最后一次重试后四个小时)再尝试三次。

自启动后,更新服务器会等待 72 小时让更新完成。如果在此间隔后仍未安装新版本,则系统会将详细错误添加到日志中。下次收到请求时,将重试更新。

您也可以使用 重试 按钮手动重试更新(如果自动更新失败)。

服务模式与用户模式机器人部署

服务模式和用户模式部署在服务器端的技术方面相同,因为它们在更新服务器和更新服务之间使用相同的连接类型。区别在于机器人服务如何与客户端计算机上的更新服务通信,如下所述。

服务模式

在服务模式部署中,机器人服务和更新服务都在本地系统帐户会话中运行。

图 1. 服务模式部署图

用户模式

在用户模式部署中,机器人服务在用户会话中运行,而更新服务在本地系统帐户会话中运行。

重要提示:

在用户模式下部署机器人和 Studio 时,将更新命令发送到计算机上的一个机器人会影响该特定计算机上的所有用户。

图 2. 用户模式部署图

警告:

更新过程完成后,必须手动启动 Studio 和机器人。

Policy configuration levels

Auto-update policies are configured in Orchestrator at three levels: user, user group, and machine. Each level controls what version is deployed to the target scope.

重要提示:

Auto-update is controlled entirely through Orchestrator policies. Installation settings during setup do not determine whether or how auto-update operates. If you want to prevent auto-update, you must configure the policy in Orchestrator (not through the installer).

Configure auto-update for users

Configuring update policies for a specific user allows you to control the Studio, Robot, and Assistant versions for that individual.

  1. Navigate to Tenant > Manage Access > Access Rules tab.
  2. Select the Users tab.
  3. Select Assign user. The Assign access rules page is displayed.
  4. Search for and select the desired user. The Summary card appears on the right showing the user's current permissions.
  5. Select Edit to modify access rules.
  6. Under Settings, locate Client binaries (Robot, Assistant and Studio) auto-update policy.
  7. Choose the auto-update policy for that user:
    • None: no policy is applied.
    • Latest patch: installs the latest patch available for each supported version (for example, latest 2022.10 patch, latest 2023.4 patch).
    • Latest version: installs the latest available version from the update server.
    • Specific version: installs a specific version from the list available on the update server.
  8. Select Update to save your changes.

重要提示:

For users that have an Express User license (previously Autopilot Express; Automation Express in legacy assignments), the update policy cannot be edited and is set to deliver the latest enterprise version. For the current license capabilities, check Express User license.

Configure auto-update for user groups

Configuring update policies for a user group allows you to apply the same policy to all group members without configuring each user individually. This is the recommended approach for attended use cases.

  1. Navigate to Tenant > Manage Access > Access Rules tab.
  2. 选择“组”选项卡。
  3. Select Assign group. The Assign access rules page is displayed.
  4. Search for and select the desired group. The Summary card appears on the right showing the group's current settings.
  5. Select Edit to modify access rules.
  6. Under Settings, locate Client binaries (Robot, Assistant and Studio) auto-update policy.
  7. Choose the auto-update policy for that group:
    • None: no policy is applied.
    • Latest patch: installs the latest patch available for each supported version (for example, latest 2022.10 patch, latest 2023.4 patch).
    • Latest version: installs the latest available version from the update server.
    • Specific version: installs a specific version from the list available on the update server.
  8. Select Update to save your changes.

备注:

Under the union of privileges model, users inherit settings from their groups, but if a user has an explicit policy configured, it takes precedence over the group policy. To prevent a user in a policy group from receiving updates, either remove them from the group or configure an explicit policy for that user set to their current installed version.

Configure auto-update for machines

Configuring update policies for machines allows you to manage versions across your unattended or attended fleet based on machine identity rather than user identity. This is the recommended approach for unattended use cases.

  1. Navigate to Tenant > Machines. The Machines window is displayed.
  2. Locate and select the desired machine object, then select Edit. The Edit Machine window is displayed.
  3. Select the Maintenance tab. The Auto Update configuration menu is displayed.
  4. Choose the auto-update policy for that machine:
    • None — No policy is applied.
    • Latest patch — Installs the latest patch available for each supported version.
    • Latest version — Installs the latest available version from the update server.
    • Specific version — Installs a specific version from the list available on the update server.
  5. 选择“保存”

Auto-update scheduling

From the Maintenance tab, you can also schedule when updates start to align with your maintenance windows.

  1. In the Auto Update configuration menu, specify a start time and date.
  2. Optionally set the duration of the maintenance window.
  3. 选择“保存”

If the maintenance window elapses before the update completes, it is rescheduled during the next available window.

备注:

For machines using the same machine key, the policy applies to all machines connected with that key.

Understanding policy priority

When multiple policies target the same Robot, they don't all apply equally. Orchestrator resolves conflicts using a strict priority order.

Priority order (highest to lowest):

  1. User-level policy
  2. Group-level policy
  3. Machine-level policy

The priority order applies when comparing policies at different levels. Between user-level and group-level policies, the newer version takes precedence regardless of priority order. When either user or group policies are set (and differ from machine-level policies), they override the machine-level policy.

Examples of policy conflicts

Example 1: User policy overrides machine policy

A machine has Robot 2023.4.0 installed. The machine-level policy is set to 2023.4.12, but the user logging into that machine has a user-level policy set to 2024.10.1. The Robot updates to 2024.10.1 (user policy wins).

Example 2: Group policy applies when user has no policy

A user has no individual policy (set to None), but belongs to a group with Latest Patch policy. The user's Robot updates to the latest patch available for their installed major version (group policy applies).

Example 3: Newer version wins between user and group

A machine has Robot 2023.4.0 installed. The user has a policy set to 2023.4.12, and their group has a policy set to 2024.10.1. The Robot updates to 2024.10.1 because it is the newer version (even though the user-level policy technically has higher priority, the group's newer version is selected).

备注:

When using Robot Accounts (unattended robots), the machine-level policy is used to handle updates, not the user policy.

更新日志

在 Orchestrator 用户界面中,更新日志可用于失败和成功的更新。

要查看计算机的更新日志,请在租户上下文中导航到“计算机”,然后为所需计算机选择“更多操作”。在“更多操作”菜单中,选择“查看已安装版本和日志”。在“已安装版本和日志”网格中,选择“查看自动更新日志”以获取所需条目。

完整的更新日志也可以在计算机上的以下位置找到:

  • 在服务模式下:%ProgramData%\UiPath\UpdateService\Logs
  • 在用户模式下:%LocalAppData%\UiPath\UpdateService\Logs
    警告:

    在克隆计算机的虚拟环境中部署机器人时,计算机名称、GUID、驱动器 ID 和 MAC 地址相同。这可能会导致冲突,因为 Orchestrator 会从多台具有相同标识符的计算机接收不同的更新状态。 在这种情况下,系统会根据连接的最后一台计算机显示 Orchestrator 中的更新状态。 这也可能会影响 Orchestrator 日志,因为多台计算机具有相同的标识符,因此可能会出现重复的日志。

版本状态

在“版本状态”列中,您可以根据关联的策略检查计算机的 Robot 版本状态。

提供以下值:

  • “无策略”图标 “无策略”- 未定义策略
  • “正在进行更新”图标 “正在进行更新”- 计算机上正在进行更新过程时,将显示此状态
  • “合规”图标 合规 – 计算机上的机器人版本与更新策略匹配。
  • “不合规”图标 “不合规”- 计算机上的 Robot 版本不同于策略中设置的版本。(例如,Robot 版本为 2021.10.3,而策略设置为 2021.10.1)
  • “更新失败”图标 “更新失败”- 更新过程失败时,将显示此状态。有关更多详细信息,请参阅更新日志。
  • 不适用 - 当启用了排除不活动计算机的设置并且有一段时间未连接机器人时,或者当计算机类型与自动更新流程不兼容时,会显示此状态。

计算机的版本状态

在 Orchestrator“计算机”选项卡上的“版本状态”列中,您可以根据关联的策略检查计算机的 Robot 版本状态。

重要提示:

Linux 机器人与自动更新功能不兼容。对于这些情况,版本状态显示为N/A ,并显示“自动更新不适用于此类计算机”的工具提示。

排除非活动的计算机

如果多台计算机使用同一个密钥连接到 Orchestrator,但其中一台计算机处于非活动状态,则计算机模板的版本状态将变为 Non compliant。这是因为计算机模板使用同一个计算机密钥与更新服务器通信,如果连接的一台计算机无法接收更新,则计算机模板的整体状态会受到影响。

为了避免这种情况,请访问租户上下文中“设置”菜单的“常规”部分,选中“客户端二进制文件”复选框,并设置首选的非活动间隔。这会将非活动计算机排除在更新流程之外,在报告更新状态时不再考虑这些计算机。

用户的版本状态

在“监控”窗口的“用户会话”选项卡上的“版本状态”列中,您可以根据关联的策略检查用户的客户端组件版本状态。

代理配置

对于机器人位于代理后面的场景,要使自动更新功能正常工作,可能需要执行其他配置。根据安装类型,代理配置可继承自用户级代理设置,也可以通过编辑配置文件手动设置。

安装类型机器人部署更新服务更新代理代理设置
无人值守的机器人Windows 服务Windows 服务不适用 1来自uipath.config文件。
有人值守的机器人用户级可执行文件Windows 服务用户级可执行文件来自uipath.config文件。
快速安装用户级可执行文件用户级可执行文件用户级可执行文件从用户级别代理设置。

1当机器人以无人值守模式安装时,更新代理不会添加到计算机中。

Collecting error logs

更新失败时,您可以使用“诊断工具”收集日志并将其发送给我们的支持团队,以便进一步调查具体错误。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新