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

命令行参数

您可以安装并更新 Studio 和 Robot,也可以通过 UiPathStudio.msiUiPathStudioCloud.msi 安装程序来更改现有安装。

请参阅以下各部分,了解有关可用参数的描述和一些用法示例。

备注:
  • 需要管理员权限才能执行这些命令。
  • 不支持在静默模式下通过从命令行运行安装程序来更改现有安装。但是,您可以在静默模式下运行安装程序,以从旧版本进行更新。
  • 不支持使用 msiexec.exe 的 /passive 选项运行无人值守安装。

命令行参数描述

下表列出了所有可用的命令行参数。

所有参数都可以用于全新安装,但是从旧版本更新或更改现有安装时,仅支持以下参数:

  • 使用 ADDLOCAL 启用功能。
  • 使用 REMOVE 禁用功能。请注意,无法禁用 Robot。
  • SERVICE_URL - 将 Robot 从服务模式切换到用户模式时可用,方式是不包括 RegisterService 参数。
  • NUGET_OPTIONSENFORCE_SIGNED_EXECUTIONDISABLE_SECURE_XAMLTELEMETRY_ENABLED - 从旧版本更新时可用,而在更改现有安装时不可用。

输入路径时,请考虑以下事项:

  • 可以使用 %USERNAME%%USERPROFILE% 等环境变量。% 特殊字符需要通过以下方式转义:
    • 从命令行提示符调用安装时 - 使用 ^ - UiPathStudio.msi PACKAGES_FOLDER=C:\Some\Path\^%USERNAME^%
    • 在批处理脚本中 - 使用 ^ - UiPathStudio.msi PACKAGES_FOLDER=C:\Some\Path\^%USERNAME^%
    • 在 PowerShell 控制台或脚本中 - 不需要转义。
    • 在使用 Active Directory 域帐户时,建议您也在文件夹结构中使用域,例如 C:\packages\^%UserDomain^%.^%Username^%
  • 如果需要使用带空格的路径,则必须按如下方式将该路径换行:
    • 在命令提示符中,使用双引号 (" ") 将其括起。例如,UiPathStudio.msi APPLICATIONFOLDER="C:\folder name"
    • 在 PowerShell 中,请使用单引号和双引号 ('" "') 将其括起。例如,./UiPathStudio.msi APPLICATIONFOLDER='"C:\folder name"'
命令 描述

/q

帮助您静默安装指定的 UiPath 功能,而不显示用户界面。

/l*vx <LogFile>

在指定路径生成安装程序日志文件。自 v2018.4.2 起,如果您在安装之时许可 Studio 或机器人,则此文件中也可能会包含许可信息。

如果您在安装过程中遇到困难,不管何种原因,均可将此文件发送给我们的支持团队。

ADDLOCAL

使您能够选择要安装的功能。如果使用 ADDLOCAL,则仅安装其中指定的功能。如果未使用 ADDLOCAL,则会安装以下功能:Studio、处于服务模式的机器人、活动包和 JavaScript 插件。

它支持以下选项:

Studio - 安装 Studio。

ExcelAddin - 安装 StudioX Excel 加载项。没有 Studio 便无法使用它。

Robot - 在用户模式或服务模式下安装 Robot 以及 Assistant。

  • 要安装处于服务模式的机器人,请添加 RegisterService 选项。我们为无人值守机器人选择推荐此选项。
  • 要在用户模式下安装 Robot,请不要添加 RegisterService 选项。我们为有人值守和开发机器人推荐该选项。
如果您将机器人从服务模式转换为用户模式,机器人可能无法访问原始 NuGet 包文件夹中的.xaml文件。 有关如何解决此问题的详细信息,请参阅“迁移后无法访问 NuGet 包”一文。

Packages - 安装活动包。如果未使用 Robot 参数,则不能使用此选项。

StartupLauncher - 在 Windows 启动时运行机器人。如果未使用 Robot 参数,则不能使用此选项。

JavaBridge - 安装 UiPath Java Bridge,以实现更出色的 Java 应用程序集成和自动化。请注意,安装 Java Bridge 可能会延长安装时间。如果未使用 Robot 参数,则不能使用此选项。

ChromeExtension - 安装 Uipath Google Chrome 扩展程序。如果未使用 Robot 参数,则不能使用此选项。

FirefoxExtension - 例如:UiPathStudio.msi ADDLOCAL=Studio,Robot,ChromeExtension,FirefoxExtension /Q

EdgeExtension - 安装基于 Microsoft Edge Chromium 的 UiPath 扩展程序。如果没有 Robot 参数,则不能使用。

CitrixClient - 安装 UiPath Citrix 客户端扩展程序。如果未使用 Robot 参数,则不能使用此选项。

JavaScriptAddOn - 安装机器人 JavaScript 插件以支持机器人 JavaScript SDK。

SapPlugin - 安装 SAP 解决方案管理器插件。需要在您的计算机上安装 SAP Connector for Microsoft。在全新安装上,您还必须使用 SAP_SOL_MAN_HOST 参数提供实例的地址。没有 Studio 便无法使用它。

VMwareExtension - 安装 UiPath VMware Horizon 扩展程序。如果未使用 Robot 参数,则不能使用此选项。

WindowsRdpExtension - 安装 UiPath Microsoft 远程桌面扩展程序。如果未使用 Robot 参数,则不能使用此选项。

MSIINSTALLPERUSER

此参数使您能够按用户或按计算机安装 Studio 和 Robot。

如果未包含该参数,则按计算机进行安装。如果添加 MSIINSTALLPERUSER=1,则安装按用户进行。

这些参数仅在执行全新安装时可用。

以下选项在按用户安装中不可用:RegisterService、CitrixExtension、VMwareExtension、SapPlugin、PACKAGES_FOLDER、CODE。

SAP_SOL_MAN_HOST

SAP Solution Manager 实例的主机名或 IP 地址。如果为 ADDLOCAL 选项提供了 SapPlugin 参数,则必须执行全新安装。

例如,UiPathStudio.msi ADDLOCAL=Studio,Robot,SapPlugin SAP_SOL_MAN_HOST=ip_address

APPLICATIONFOLDER

用于在自定义位置安装 Studio 和机器人。

NUGET_OPTIONS

如果您在离线环境中操作,建议使用此参数。若设为 DisableOnlineFeeds,此参数可帮助您禁用机器人的在线 UiPath 官方及社区订阅源,仅考虑使用 Orchestrator 和本地订阅源。

请注意,不会从配置文件中删除 URL 订阅源,仅忽略它们。

It can be used for both installations and upgrades. The NUGET_OPTIONS parameter does not disable the online UiPath official and Community feeds for Studio.

PACKAGES_FOLDER

用于更改 Studio 和/或机器人工作流及其依赖项的下载位置。此文件夹可以由特定用户访问,也可由计算机上的所有用户访问。此参数可用于服务模式机器人或用户模式机器人。如果不提供此参数,则默认文件夹是 %userProfile%\.nuget\packages

更改包文件夹时,请确保需要执行流程的所有用户都具有对此文件夹的读取访问权限。

When using the PACKAGES_FOLDER parameter, there are some limitations. Find out more in the custom package folders and network paths documentation.

  • For installations on Windows Server machines (that enable concurrent execution - HD Robots), you must provide paths that are specific to each user. Read more about using the same path for multiple robots.

For information on how to change the download folder for packages after installation, see Managing Activities Packages.

CUSTOM_NUGET_FEEDS

让您可以为 Studio 和/或机器人添加自定义 NuGet 活动订阅源。此命令仅添加或更新现有的订阅源列表。

必须使用字符串类型的键值对来填充。有效的位置包括在线订阅源、文件夹路径和共享网络驱动器。确保提供的订阅源可被给定计算机上的所有用户访问。以分号 (;).分隔多个订阅源

示例:CUSTOM_NUGET_FEEDS="FeedName1,https://my.custom.nuget.feed; FeedName2,D:\Custom\Activities\Packages\"

ENFORCE_SIGNED_EXECUTION

可选。让您可以强制机器人仅执行签名的包。可以在全新安装或更新实例时使用。如果部署时不指定此参数,则不启用包签名。

它支持以下选项:

  • 1 - The Robot is able to download, install, or execute only packages author or repository signed by UiPath. If you want to add your own certificate as a trusted source, you have to do so by modifying the nuget.config file. To learn how to do this, please see this page.
  • 0 - 不在您的机器人部署中实施任何包签名规则。

For information on how to enforce signed execution after installation, see Signing Packages .

CODE

许可您的 Studio 实例。

CONNECTIONSTRING

Automatically connects the Robot to Orchestrator on-premises using the connection string while also installing it. Please note that the following are required:

  • 必须将 UiPath.Orchestrator.dll.config 文件中的 WindowsAuth.Enabled 参数设置为 true
  • 必须将 WindowsAuth.Domain 参数设置为有效域
  • the Service Mode Robot
  • a Standard Machine configuration has to be in place.
Automatic enrollment with standard machines using the CONNECTIONSTRING can only be used with Orchestrator v2020.10.

CLIENT_IDCLIENT_SECRET

在安装机器人的同时,使用客户端凭据自动将机器人连接到 Orchestrator。

示例:UiPathStudio.msi ORCHESTRATOR_URL=https://demo.uipath.com/company/tenant/orchestrator_ CLIENT_ID=1234-abcd-1ab2-cd32-1111 CLIENT_SECRET=2143ndafj32k

CHROME_INSTALL_TYPE

允许您选择 Chrome 扩展程序的安装方法。此参数要求安装程序以管理员权限运行。如果忽略,则会自动选择最合适的安装方法。

它支持以下选项:

  • POLICYOFFLINE - The Chrome Extension is automatically installed per system via the Group Policy Offline method, the equivalent of calling the /Chrome-Policy-Offline command using the SetupExtensions tool.
  • POLICYONLINE - The Chrome Extension is automatically installed per system via the Group Policy Online method, the equivalent of calling the /ChromePolicyGlobal command using the SetupExtensions tool.
  • MANUALPERMACHINE - The Chrome Extension is installed for all users, the equivalent of calling the /ChromeGlobal command using the SetupExtensions tool.
  • NATIVEHOSTONLY - Only the Native Messaging Host component (ChromeNativeMessaging.exe) is installed, the equivalent of calling the /ChromeNativeHostGlobal command using the SetupExtensions tool.
保留旧的安装方法名称 (STOREGLOBAL) 以实现向后兼容性。

EDGE_INSTALL_TYPE

允许您选择 Edge 扩展程序的安装方法。此参数要求安装程序以管理员权限运行。如果忽略,则会自动选择最合适的安装方法。

它支持以下选项:

  • POLICYOFFLINE - The Edge Extension is automatically installed per system via the Group Policy Offline method, the equivalent of calling the /Edge-Policy-Offline command using the SetupExtensions tool.
  • POLICYONLINE - The Edge Extension is automatically installed per system via the Group Policy Online method, the equivalent of calling the /Edge-Chromium-PolicyGlobal command using the SetupExtensions tool.
  • MANUALPERMACHINE - The Edge Extension is installed for all users, the equivalent of calling the /Edge-Chromium-Global command using the SetupExtensions tool.
  • NATIVEHOSTONLY - Only the Native Messaging Host component (ChromeNativeMessaging.exe) is installed, the equivalent of calling the /Edge-Chromium-NativeHostGlobal command using the SetupExtensions tool.
保留旧的安装方法名称 (STOREGLOBAL) 以实现向后兼容性。

DISABLE_SECURE_XAML

允许为安装为 Windows 服务的机器人禁用 XAML 文件的安全性。未受保护的 XAML 文件允许用户读取并修改流程文件和逻辑。

它支持以下选项:

  • 0 - 默认选项。如果使用,则为 Windows 服务机器人启用 XAML 文件的安全性。
  • 1 - 为 Windows 服务机器人禁用 XAML 文件的安全性。
此参数只能在全新安装或更新期间使用。

SERVICE_URL

允许您定义用户将使用交互式登录连接的 Orchestrator 实例的 URL。

所提供的 URL 保存在 uipath.config 文件中,并且仅保存为用户模式机器人。对于服务模式安装,该参数将被忽略。

运行安装程序以从较早版本进行更新或更改现有安装时,如果要将 Robot 从服务模式切换到用户模式(不包括 RegisterService 选项),则支持使用此参数。

ORCHESTRATOR_URL

在全新安装中,您可以指定用于检索自动更新信息的主要 Orchestrator URL(例如,https://orchestrator.local/organizationName/tenantName)。

TELEMETRY_ENABLED

允许您禁用使用情况数据收集,并且可以在 Studio 和机器人的安装时完成。

此参数只能在全新安装或更新期间使用。

默认情况下,为 Studio 和机器人启用遥测。要禁用该功能,请在执行全新安装或更新时为参数使用以下值:

  • TELEMETRY_ENABLED=0
这将禁用 Studio 和 Robot 的遥测。

如果要启用遥测,请不要包含该参数,或将其包含在以下值中:

  • TELEMETRY_ENABLED=1

For more information about usage data collection and how to change telemetry settings, see the Opting Out of Telemetry document.

ENABLE_PIP

允许您在 UiPath 命令行安装过程中启用计算机的画中画功能。

要启用它,请使用以下参数:

  • ENABLE_PIP=1

示例:

UiPathStudio.msi ADDLOCAL=Studio,Robot,RegisterService,Packages ENABLE_PIP=1

INSTALLER_LANGUAGE

使您能够选择安装程序的显示语言。如果未指定,则将根据 Windows 中的语言设置确定安装程序的语言。要指定语言,请输入参数 INSTALLER_LANGUAGE=<language_code>。可选择以下选项:

  • 中文(简体):INSTALLER_LANGUAGE=2052
  • 英语:INSTALLER_LANGUAGE=9
  • 法语:INSTALLER_LANGUAGE=12
  • 德语:INSTALLER_LANGUAGE=7
  • 日语:INSTALLER_LANGUAGE=17
  • 韩语:INSTALLER_LANGUAGE=1
  • 葡萄牙语(葡萄牙):INSTALLER_LANGUAGE=22
  • 葡萄牙语(巴西):INSTALLER_LANGUAGE=1046
  • 俄语:INSTALLER_LANGUAGE=25
  • 西班牙语(西班牙):INSTALLER_LANGUAGE=10
  • 西班牙语(墨西哥):INSTALLER_LANGUAGE=2058
  • 土耳其语:INSTALLER_LANGUAGE=31
ORCHESTRATOR_AUTO_SIGNINFor user-mode installations in environments configured to use SSO with Azure Active Directory, this parameter enables automatic sign-in to your account. Must be used together with ORCHESTRATOR_URL.

要启用此选项,请使用 ORCHESTRATOR_AUTO_SIGNIN=1

ENFORCE_DEFAULT_SERVICE_URL

对于用户模式安装,此参数强制执行默认服务 URL。

要启用此选项,请使用 ENFORCE_DEFAULT_SERVICE_URL=1

也必须启用 ORCHESTRATOR_URL

执行同步安装

如果要在安装完成后进行其他配置,可以同步运行安装程序。这使您能够添加要在安装程序完成后执行的其他命令,例如,您可以安装并设置机器人连接或配置订阅源。

以下脚本将执行安装,并允许您添加安装成功后要执行的其他命令。

:: Runnning the MSI synchronously
start /wait /b UiPathStudio.msi /Q
:: Assert the exit code and continue accordingly
set "_isSuccess="
if %ERRORLEVEL% EQU 0 Set "_isSuccess=1"
if %ERRORLEVEL% EQU 1641 Set "_isSuccess=1"
if %ERRORLEVEL% EQU 3010 Set "_isSuccess=1"
:: test for success and run follow-up commands
if (%_isSuccess% EQU 1) (
    echo "success"
) ELSE (
    echo "fail"
)
:: Runnning the MSI synchronously
start /wait /b UiPathStudio.msi /Q
:: Assert the exit code and continue accordingly
set "_isSuccess="
if %ERRORLEVEL% EQU 0 Set "_isSuccess=1"
if %ERRORLEVEL% EQU 1641 Set "_isSuccess=1"
if %ERRORLEVEL% EQU 3010 Set "_isSuccess=1"
:: test for success and run follow-up commands
if (%_isSuccess% EQU 1) (
    echo "success"
) ELSE (
    echo "fail"
)

示例

编写这些示例时,我们假设您已处于 UiPathStudio.msi 安装程序所在的目录中。您可以使用以下命令来完成此操作,例如:cd D:\UiPathInstaller

  • 将 Studio、机器人安装为 Windows 服务和活动包 - UiPathStudio.msi ADDLOCAL=Studio,Robot,RegisterService,Packages

  • 在用户模式下仅为当前用户安装 Studio 和 Robot- UiPathStudio.msi MSIINSTALLPERUSER=1 ADDLOCAL=Studio,Robot

  • 静默安装整个桌面套件 - UiPathStudio.msi ADDLOCAL=Studio,Robot,RegisterService,Packages,StartupLauncher,JavaBridge /Q

  • 通过策略静默安装整个桌面套件和 Chrome 扩展程序 - UiPathStudio.msi ADDLOCAL=Studio,Robot,RegisterService,Packages,ChromeExtension CHROME_INSTALL_TYPE=POLICYONLINE /Q

  • 将 Studio、机器人静默安装为 Windows 服务和活动包,并且全部安装在 D:\UiPath 文件夹中 - UiPathStudio.msi ADDLOCAL=Studio,Robot,RegisterService,Packages APPLICATIONFOLDER=D:\UiPath /Q

  • 将机器人静默安装为 Windows 服务,并将其连接到 Orchestrator -

    UiPathStudio.msi ADDLOCAL=Robot,RegisterService CONNECTIONSTRING=https://demo.uipath.com/api/robotsservice/GetConnectionData?tenantId=1 /Q

  • 以静默方式安装 Studio,将机器人安装为 Windows 服务,并添加两个自定义活动订阅源 - UiPathStudio.msi ADDLOCAL=Studio,Robot,RegisterService CUSTOM_NUGET_FEEDS="Feed Name1,https://my.custom.nuget.feed; FeedName2,D:\RPA\Activities\Packages\" /Q

  • 静默安装并许可 Studio、注册为 Windows 服务的机器人和本地活动订阅源 - UiPathStudio.msi ADDLOCAL=Studio,Robot,RegisterService,Packages CODE=1234567890 /Q

  • 将机器人安装为 Windows 服务,并禁用官方在线订阅源 - UiPathStudio.msi ADDLOCAL=Robot,RegisterService NUGET_OPTIONS=DisableOnlineFeeds

  • 卸载 Chrome 扩展程序 - UiPathStudio.msi REMOVE=ChromeExtension /Q

  • 在安装 Attended Robot 期间设置自动更新连接 - UiPathStudio.msi ADDLOCAL=Robot, SERVICE_URL="https://demo.uipath.com/myorg/mytenant"

  • 在安装 Unattended Robot 期间设置自动更新连接 - UiPathStudio.msi ADDLOCAL=Robot,RegisterService ORCHESTRATOR_URL="https://demo.uipath.com/myorg/mytenant/orchestrator_"

  • 命令行参数描述
  • 执行同步安装
  • 示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新