About
此功能允许管理员从 Orchestrator 将 Robot、Studio 和 UiPath Assistant 客户端更新到较新版本。这提供了一种从集中位置向大量计算机交付版本更新的简单方法,从而帮助消除用户的烦恼并简化更新过程。
先决条件
- Orchestrator、Studio 和 Robot 2021.10 或更高版本。
- 客户端计算机上安装了 Studio 和/或 Robot 2021.10 或更高版本,并且已连接到 Orchestrator。
更新过程中涉及的组件
客户端
- 客户端应用程序:
- 机器人
- Assistant
- Studio
- 机器人服务
- 更新代理 - 一个 Windows 进程,负责用户和更新服务之间的通信。 (仅在用户模式和有人值守的机器人安装中存在)
- 更新服务 - 负责客户端计算机和更新服务器之间的通信的 Windows 服务。
服务器端
- Orchestrator:为管理员提供用户界面,以设置自动更新策略并查看客户端应用程序的版本状态。
- 更新服务器:一个集中式服务,用于管理自动更新策略并通过更新服务维护与客户端计算机的通信。
工作原理
作为管理员,您可以选择要在特定计算机上部署的特定版本。
为此,在安装 Studio 和 Robot 时,还会将两个可执行文件添加到计算机中:UiPath.UpdateService.Worker.exe
和 UiPath.UpdateService.Agent.exe
。
根据 Studio/Robot 安装的类型,它们的安装方式不同:
- 无人值守机器人:
UiPath.UpdateService.Worker.exe
已安装为 Windows 服务,但未安装UiPath.UpdateService.Agent.exe
。 - 有人值守的机器人:
UiPath.UpdateService.Worker.exe
已安装为 Windows 服务;UiPath.UpdateService.Agent.exe
在任务计划程序中作为登录任务安装。 - 快速安装(用户模式):
UiPath.UpdateService.Worker.exe
和UiPath.UpdateService.Agent.exe
在任务计划程序中作为登录任务安装。
重要
When installing Studio and Robot per-machine in attended user-mode, for the update service to connect to the update server, make sure to add the Orchestrator URL during setup. If the Orchestrator URL is not added during installation, a user with administrator rights on the machine has to log on to the machine and connect the robot to Orchestrator.
定义新策略或更改策略后,更新服务器会向客户端计算机上的更新服务发送一个命令,该命令会询问客户端应用程序是否准备好开始更新过程。
要准备好接收更新,产品必须处于中性状态:
- Studio - 无正在运行的流程或活动会话。
- Robot - 无正在运行的作业或流程。
- Assistant - 无正在运行的流程或待处理活动(正在安装或下载流程)。
备注:
在更新过程中,在更新完成之前,机器人不会启动任何作业。
在有人值守场景中,系统会显示更新提示,为用户提供两个选项:
Update Now
- 停止所有正在运行的作业并关闭该计算机上的所有 Studio 实例,然后继续更新。Later
- 使通知静音,可以通过转到系统托盘中的用户界面图标并单击“检查更新”来继续更新过程。
当用户接受提示时,系统会将确认消息发送到更新服务,并启动更新流程。 如果自首次通知后 24 小时内未提供响应,则系统将自动安装更新。
在无人值守场景中,更新服务会确认客户端应用程序是否处于中性状态(如上所述),然后再将确认发送回更新服务器。
备注:
如果计算机上有任何流程正在运行,系统会提示用户选择要停止该流程,还是等待流程完成再继续更新。如果 Studio 会话已打开,则系统会提示用户保存进度。
如果用户未响应,则 Studio 将关闭,此时流程将保持原样,并且可以在更新完成后恢复,而机器人会等待任何流程完成,然后再开始更新过程。
更新过程步骤
更新过程分为七个阶段:
- 正在下载
- 更新服务每三个小时检查一次更新服务器是否有更新请求。 如果收到更新请求,则更新流程将启动下载流程。 如果下载过程已成功启动,则更新请求将添加到更新服务器数据库中,状态为
Downloading
。
- 已下载
Downloaded
状态充当标记,以便更新服务可以启动后处理阶段。此状态表示已成功下载更新文件。
- 正在处理
- 此步骤将对下载的文件进行后处理。在此步骤中,将检查文件,如果没有出现错误,则安装过程将启动。
- 准备安装
- 更新代理会通知用户正在等待安装更新,并请求批准或检查客户端应用程序是否已准备好接收更新。
- 已批准安装
- 一旦更新服务收到批准,便开始实际安装。
- 正在安装
- 新版本将安装到计算机上,并保持与先前版本相同的设置。
- 成功/错误
- 根据安装结果,更新状态将报告回更新服务器和 Orchestrator 界面。
备注:
If the Chrome extension was already installed on the robot machine, the auto-update functionality updates it as well. Otherwise, the extension has to be installed manually.
重试机制
在更新过程中,如果在首次下载中无法检索到文件,则更新服务将再重试三次。重试间隔为:首次尝试后一小时,然后在第一次重试后两个小时,以及最后一次重试后四个小时。在每次重试之前,都会通过通知系统通知用户。
每次尝试下载时,系统会将日志添加到 Orchestrator 更新日志中,并添加到计算机本地的 %localappdata%/Uipath/UpdateService/logs
文件中。
该过程与安装类似,这意味着如果第一次安装失败,更新服务将以相同的频率(首次尝试后一小时,第一次重试后两小时,以及最后一次重试后四个小时)再尝试三次。
自启动后,更新服务器会等待 72 小时让更新完成。如果在此间隔后仍未安装新版本,则系统会将详细错误添加到日志中。下次收到请求时,将重试更新。
服务模式与用户模式机器人部署
服务模式和用户模式部署在服务器端的技术方面相同,因为它们在更新服务器和更新服务之间使用相同的连接类型。区别在于机器人服务如何与客户端计算机上的更新服务通信,如下所述。
服务模式
在服务模式部署中,机器人服务和更新服务都在本地系统帐户会话中运行。

用户模式
在用户模式部署中,机器人服务在用户会话中运行,而更新服务在本地系统帐户会话中运行。
重要提示:
在用户模式下部署机器人和 Studio 时,将更新命令发送到计算机上的一个机器人会影响该特定计算机上的所有用户。

重要
更新过程完成后,必须手动启动 Studio 和机器人。
配置策略
可以为用户、用户组(推荐用于有人值守用例)或计算机(推荐用于无人值守用例)设置策略。
配置用户/用户组的策略
通过为用户或用户组配置更新策略,管理员可以控制特定用户或用户组的 Studio、Robot 和 Assistant 版本。
- 特定用户 - 精细更新与特定用户相关联的组件。
- 用户组 - 更新所有组成员的访问权限,而无需单独设置每个用户的访问权限级别。
通过在 Orchestrator 的“管理访问权限”选项卡中编辑特定用户或组来配置策略。
- 导航到“租户”>“管理访问权限”。系统将显示“用户”窗口。
- 对于所需的用户/用户组,单击“编辑”。系统将显示“编辑用户”窗口。
- 在“更新策略设置” 部分中,将自动更新策略更改为以下值之一:
按用户

按组

备注:
如果将应用于用户的策略设置为
None
,但用户所属的组也设置了特定策略(例如最新补丁),则应用组策略。如果不希望更新该特定用户的组件,则必须从具有该策略的组中删除该用户,或者将更新策略设置为已安装的当前版本。
如果用户设置了推送特定版本的策略,并且他们也属于具有不同策略的组,则以用户级别策略为准。
每台计算机对象
通过为计算机对象配置更新策略,管理员可以使用特定的计算机密钥更新连接到 Orchestrator 的所有计算机上的机器人版本。
要为计算机对象配置更新策略,请按照以下步骤操作:
- 导航到“租户”>“计算机”。系统将显示“计算机”窗口。
- 对于所需的计算机对象,单击“编辑”。系统将显示“编辑计算机”窗口。
- 访问“维护”选项卡。系统将显示“自动更新”配置菜单。
- 使用此处描述的选项配置更新策略。

自动更新计划
在“维护”选项卡中,您还可以安排更新在特定时间和日期开始,以配合公司的其他维护窗口。您还可以设置维护窗口的持续时间。如果为维护窗口设置的时间已过,但更新未开始,则会在下一个可用的时间间隔内安排更新。
策略优先级
如果用户级别策略、组级别策略和计算机级别策略同时应用于同一个机器人,则以用户级别策略为准。
示例:
- 计算机 1 已安装 Robot 和 Studio 版本 2021.10。
- 在计算机 1 上,机器人以 John.Doe@domain.com 用户身份通过交互式登录连接到 Orchestrator。
- 更新策略将应用于 john.doe@domain.com,该策略设置为推送版本 2021.10.2。
- john.doe@domain.com 也属于组 1。
- 更新策略将应用于组 1,该策略设置为推送版本 2021.10.3。
- 更新策略将应用于计算机 1,该策略设置为推送版本 2022.4。
结果:触发更新策略时,该计算机上的组件将更新到版本 2021.10.2。
备注:
请注意,使用机器人帐户时,将使用计算机级别策略来处理更新。
策略中的版本可用性
创建更新策略时,可以选择以下选项之一:
Latest major version | Latest patch | Specific patch |
---|---|---|
Installs the latest available version found on the update server. | Installs the latest patch available for each of the supported versions. (e.g. Latest 2021.10 patch, Latest 2022.4 patch). | Installs a specific patch from the list of the ones available in the Update Server. |
更新日志
在 Orchestrator 用户界面中,更新日志可用于失败和成功的更新。 可在计算机上的%localappdata%/Uipath/UpdateService/logs
文件中找到更新的完整日志。


重要
在克隆计算机的虚拟环境中部署机器人时,计算机名称、GUID、驱动器 ID 和 MAC 地址相同。这可能会导致冲突,因为 Orchestrator 会从多台具有相同标识符的计算机接收不同的更新状态。
在这种情况下,系统会根据连接的最后一台计算机显示 Orchestrator 中的更新状态。
这也可能会影响 Orchestrator 日志,因为多台计算机具有相同的标识符,因此可能会出现重复的日志。
版本状态
在“版本状态”列中,您可以根据关联的策略检查计算机的 Robot 版本状态。
提供以下值:
No policy - no policy is defined
Update in progress - this status is presented when the update process is ongoing on the machine
Compliant – the robot version on the machine is matching to the update policy.
Non-compliant - the robot version on the machine is different than what was setup in the policy. (e.g. robot version is 2021.10.3, the policy is set up as 2021.10.1)
Update failed - this status shows when the update process failed. More details can be found in the update logs.
- N/A - this status shows up when the setting to ignore inactive machines is enabled and the robot hasn’t been connected for a while, or when the machine type is not compatible with the auto-update process.
计算机的版本状态
在 Orchestrator“计算机”选项卡上的“版本状态”列中,您可以根据关联的策略检查计算机的 Robot 版本状态。

备注:
Elastic 机器人与自动更新功能不兼容。 对于这些,版本状态显示为
N/A
,并带有“自动更新不适用于此类计算机”工具提示。
排除非活动的计算机
If multiple machines are connected to Orchestrator using the same key and one of them is inactive, the version status of the machine template becomes Non compliant
. This is happening as the machine template communicates with the update server using the same machine key, and if one of the machines connected is unable to receive an update, the overall status of the machine template is impacted.
为避免这种情况,请在租户上下文中访问“设置”菜单的“常规”部分,选中“客户端二进制文件”复选框并设置首选的非活动间隔。这会将非活动的计算机排除在更新过程之外,并且在报告更新状态时不再考虑它们。

用户的版本状态
在 Orchestrator 的“机器人”选项卡上的“版本状态”列中,您可以根据关联的策略检查用户的客户端组件版本状态。

管理更新版本
如果您的 Orchestrator 实例可以访问互联网,则默认情况下,版本管理由 UiPath 完成,并且策略中的可用版本列表将自动填充。如果要手动管理版本,请转到“设置” > “常规”,然后清除“自动填充可用产品版本”复选框。
If you choose not to have the version management done by UiPath or your Orchestrator instance does not have Internet access, you must manually download the installers of the client components from the UiPath Customer Portal - Product Downloads page and upload them to the update server using the steps below:
- 使用安装访问令牌中描述的步骤从身份服务器获取
-InstallationToken
。注意:如果您使用的是 Automation Suite,则在您以主机管理员身份登录到主机租户/组织,打开一个新选项卡并转到https://baseURL/identity/api/Account/ClientAccessToken
后,将获得安装令牌。 - If you need the
ClientId
andClientSecret
values, run the script using the command below:
备注:
The scripts needed for the commands below are located in the installation folder (default path is
C:\Program Files (x86)\UiPath\Orchestrator\Tools\UpdateServerScripts
) on the Orchestrator machine.The supported product versions to be used in the scripts are found in the Product Lifecycle documentation page. For the update scripts, the short format of the version is used (e.g. 22.4.3 instead of 2022.4.3).
.\Provision-IdentityClient.ps1 -IdentityUri "<IDENTITY_URL>" -InstallationToken "<INSTALLATION_TOKEN>"
获取所需的参数值后,即可使用以下命令之一来管理更新版本。
获取可用版本
.\Product-Versions.ps1 get -ApiBaseUri "<ORCHESTRATOR_URL>" -IdentityUri "<IDENTITY_URL>" -ClientId "<CLIENT_ID>" -ClientSecret "<CLIENT_SECRET>"
在更新服务器中发布新版本
.\Product-Versions.ps1 register -ApiBaseUri "<ORCHESTRATOR_URL>" -IdentityUri "<IDENTITY_URL>" -ClientId "<CLIENT_ID>" -ClientSecret "<CLIENT_SECRET>" -ProductId "b69fdacf-6dd0-46fb-88c7-af2d87caf5aa" -Version "<NEW_VERSION>" -DownloadUri "<DOWNLOAD_URL>"
.\Product-Versions.ps1 register -ApiBaseUri "https://intranet/orchestrator_" -IdentityUri "https://intranet/identity_" -ClientId "<CLIENT_ID>" -ClientSecret "<CLIENT_SECRET>" -ProductId "b69fdacf-6dd0-46fb-88c7-af2d87caf5aa" -Version "22.4.3" -DownloadUri "https://download.uipath.com/versions/22.4.3/UiPathStudio.msi"
从更新服务器中删除特定版本
DELETE
.\Product-Versions.ps1 delete -ApiBaseUri "<ORCHESTRATOR_URL>" -IdentityUri "<IDENTITY_URL>" -ClientId "<CLIENT_ID>" -ClientSecret "<CLIENT_SECRET>" -ProductId "b69fdacf-6dd0-46fb-88c7-af2d87caf5aa" -Version "<NEW_VERSION>"
在客户端计算机上发布新版本
.\Provision-IdentityClient.ps1 -IdentityUri "<IDENTITY_URL>" -InstallationToken "<INSTALLATION_TOKEN>" -ClientId "<CLIENT_ID>" -ClientSecret "<CLIENT_SECRET>"
代理配置
For scenarios in which the robots are sitting behind a proxy, for the auto-update feature to work, additional configuration might be needed. Based on the installation type, proxy configurations can either be inherited from the user-level proxy settings, or set manually by editing the uipath.config
file.
Installation Type | Robot Deployment | Update Service | Update Agent | Proxy Settings |
---|---|---|---|---|
Unattended Robot | Windows Service | Windows Service | N/A 1 | From the uipath.config file. |
Attended Robot | User-level executable | Windows Service | User-level executable | From the uipath.config file. |
Quick Install | User-level executable | User-level executable | User-level executable | From the user level proxy settings. |
1
当机器人以无人值守模式安装时,更新代理不会添加到计算机中。
收集错误日志
When an update fails, you can use the Diagnostic Tool to collect logs which can be sent to our Support Team which are used for further investigation on the specific error.
Error Message

诊断工具设置

约一个月前更新