订阅

UiPath Studio

UiPath Studio 指南

批量更新命令行参数

“项目依赖项批量更新”命令行用户界面可用于批量更新属于多个自动化项目的 project.json 文件。该界面允许添加或删除依赖项、更改包版本和运行时规则,以及在发布流程或库前为其签名。

请注意,在使用“项目依赖项批量更新工具”时,您将隐式接受所更新的各个包版本的许可条款。

📘

Note:

自 Studio v2018.4.4 起,我们已为 Studio 企业版提供“项目依赖项批量更新”命令行用户界面。

UiPath.Studio.CommandLine.exe 位于安装文件夹中。默认情况下,Windows 安装程序 (.msi) 版 Studio 的路径为 C:\Program Files\UiPath\Studio\

以用户模式 (.exe) 安装的 Studio 的默认路径如下:%LocalAppData%\UiPath\[Studio_version]\

若要查看特定于各个命令的参数,只需使用 --help。使用 --version 来检查 UiPath.Studio.CommandLine.exe 的版本。

一个命令行中可以组合使用多个命令。此外,特定参数不需要在同一命令行中重复,例如将 r, --repository 用于 svn loginsvn checkout 时。

📘

Important!

在将“项目依赖项批量更新”命令行用户界面与“TFS”搭配使用前,请确保您要更新的项目断开与当前用户的“TFS”的连接。

建议使用“项目依赖项批量更新工具”保存并关闭 Studio 中的项目,然后再进行更改。

用于更新本地文件的命令

  • list - 查找和显示存储在特定目录中的 project.json 文件的路径。也可以列出本地网络驱动器中的项目。以下参数应当与 list 命令搭配使用:

Argument

Description

-d, --directory

The directory that stores the files that you want to list. Use -u, --user and -p, --pass arguments for password-protected remote directories.

📘

Note:

如果未将 --directory 参数用于 list 命令,将显示当前工作目录中所有 project.json 文件的路径。

  • manage - 管理指定的项目。请注意,可以添加或删除多个依赖项和规则,只需使用空格分隔它们。以下参数应当与 manage 命令搭配使用:

Argument

Description

-a, --add-ref

Adds or updates the dependency and runtime rule to the project.json file.
”dependencyname|version|runtimerule” = adds or updates the dependency version and runtime rule.
”dependencyname|prereleaseversion|runtimerule” = adds the dependency’s prereleased version and the specified runtime rule.

r, --rem-ref

Removes the specified dependencies from the project.json file.
"dependencyname" - the dependency to be removed from the project, regardless of its version.
"dependencyname|version" - removes the dependency with this specific version, regardless if it’s a prerelease version.

-p, --project-path

The path to the project.json file.

📘

Note:

运行时规则的语法是 lowest(代表“最低适用版本”)和 strict(“严格”版本)。如果这两个参数都未提及,则默认为应用“最低适用版本”。

例如,以下命令 manage --project-path "C:\Users\username\Documents\UiPath\BlankProcess\project.json" --add-ref "UiPath.Excel.Activities|2.6.2|lowest" 会将包版本更改为 2.6.2,并将运行时规则更改为“最低适用版本”。

  • publish - 发布项目及依赖项更改。以下参数应当与 publish 命令搭配使用:

Argument

Description

-p, --project-path

The path to the project.json to publish. The argument is mandatory.

-g, --target

Where to publish the project:
Custom - Custom URL or local folder. Define the location using the -f, --feed argument.
Robot - Default publish location for the Robot, if not connected to Orchestrator.
OrchestratorTenant - Orchestrator Tenant Feed.
OrchestratorPersonalFolder - Orchestrator Personal Workspace Feed.

-f, --feed

The custom URL for publishing the project. This can also be a custom local directory, similar to the path in the Publish options tab in Studio.

-a, --api-key

The API key for publishing the project. This argument can be used for a custom target.

-i, --icon

Path to the custom icon to use for the package.

-n, --notes

Release notes that contain changes brought to the project.

-v, --new-version

The new version for the project.

-t, --timeout

Specifies the timeout value for publishing projects. The default timeout is 30 seconds. This setting only applies for the package transfer to Orchestrator duration.

--cer-path

The local path to the certificate for package signing.

--cer-password

The password for the certificate.

--timestamper-url

The URL to the timestamper.

📘

Note:

目前,接受将 .pfx.p12 证书扩展程序用于为项目签名。如需更多详细信息,请查阅为包签名页面。

Building upon the example from above, the following command updates the UiPath.Excel.Activities pack to version 2.6.2, changes the runtime rule to Lowest Applicable Version, adds release notes and a new version, and publishes the project to a custom location:
manage --project-path "C:\Users\username\Documents\UiPath\BlankProcess\project.json" --add-ref "UiPath.Excel.Activities|2.6.2|lowest" publish --custom-url "C:\Users\username\Desktop\myfeed" --notes "Changes were made to the Excel package" --new-version "1.0.2".

工作流分析器命令

您可使用命令行参数,以基于一组规则分析文件或项目。

  • analyze - 分析整个项目。必须提供 project.json 文件的路径。
  • analyze-file - 分析单个文件。必须提供 .xaml 文件的路径。

Argument

Description

-p, --project-path

For analyzing one file, provide the path to the .xaml. For analyzing the entire project, specify the path to the project.json file.

-c, --config-path

Path to the RuleConfig.json file. Specify this path only if the rule configuration file is not placed in the default location (%LocalAppData%\UiPath\Rules).

Read the About Workflow Analyzer page to find out more about how to analyze files/projects and configure rules using command-line parameters.

GIT 特定命令

  • git clone = 将存储库克隆到新目录。

📘

Note:

在运行 UiPath.Studio.CommandLine.exe git clone 之前,请确保存储库的凭据已存储在 Windows 凭据管理器中。否则,将发生认证错误。

以下参数应与 git clone 命令一起使用:

Argument

Description

r, --repository

The repository address/URL that stores the projects that you would like to modify. The argument is mandatory.

-d, --directory

The working directory. If not specified, the current environment directory is used.

  • git commit = 将更改记录到存储库。以下参数应当与 git commit 命令一起使用:

Argument

Description

-m, --message

Write a commit message to detail the changes brought to the projects. The commit message is mandatory.

-p, --push

Upload changes to the remote repository.

-d, --directory

The working directory. If not specified, the current environment directory is used.

-f, --files

The paths to the files that you want to edit. The paths should be relative to the working directory and separated by semicolons.

SVN 相关命令

  • svn login = 使用凭据来登录特定的 SVN 存储库。以下参数应当与 svn login 命令搭配使用:

Argument

Description

r, --repository

The repository address/URL that stores the projects that you would like to modify. The argument is mandatory.

-p, --password

The password required for authentication to the SVN repository.

-s, --password-stdin

Reads the authentication password from STDIN (standard input). You are prompted to input the password to the desired repository.

u, --user

The username required for authentication.

  • svn checkout = 从 SVN 存储库签出项目。以下参数应当与 svn checkout 命令搭配使用:

Argument

Description

-d, --directory

The destination checkout folder for the files. The argument is mandatory.

-r, --repository

The address of the repository that stores the files you want to checkout. The argument is mandatory.

  • svn edit = 解锁一个或多个项目并使它们可供编辑。以下参数应当与 svn edit 命令搭配使用:

Argument

Description

-f, --files

The paths to the files that you want to edit. The paths should be relative to the working directory and separated by semicolons. The argument is mandatory.

-d, --directory

The working directory which contains the files that you want to edit. If a working directory isn’t specified, the current environment directory is used.

  • svn checkin = 签入对自动化项目进行的更改。以下参数应当与 svn checkin 命令搭配使用:

Argument

Description

-m, --message

Write a commit message to detail the changes brought to the projects. The commit message is mandatory.

-d, --directory

The working directory where the projects are being checked in. If a working directory isn’t specified, the current environment directory is used.

-f, --files

The paths to the files that you edited. The paths should be relative to the working directory and separated by semicolons.

TFS 相关命令

  • tfs login = 使用凭据来登录特定的 TFS 存储库。以下参数应当与 tfs login 命令搭配使用:

Argument

Description

-t, --type

The login method for the TFS repository:
ntlm = authentication through NT LAN Manager on a local TFS repository.
token = authentication using a personal access tokens enabled on the TFS repository.
basic = basic authentication on a secure TFS repository.

-p, --password

The password required for authentication to the SVN repository.

-s, --password-stdin

Reads the authentication password from STDIN (standard input). You are prompted to input the password to the desired repository.

u, --user

The username required for authentication.

-c, --collection

Refers to the collection URI. The argument is mandatory.

  • tfs checkout = 从 TFS 存储库签出项目。以下参数应当与 tfs checkout 命令搭配使用:

Argument

Description

-c, --collection

Specify the collection URI.

-d, --directory

The destination checkout folder for the files. The argument is mandatory.

-r, --remotedir

The path to the project directory, relative to the collection root. It starts with $/ and is preceded by the collection URI.

  • tfs edit - 解锁一个或多个项目并使它们可供编辑。以下参数应当与 tfs edit 命令搭配使用:

Argument

Description

-f, --files

The paths to the files that you want to edit. The paths should be relative to the working directory and separated by semicolons.

-d, --directory

The working directory which contains the files that you want to edit. If a working directory isn’t specified, the current environment directory is used.

  • tfs checkin - 签入对自动化项目进行的更改。以下参数应当与 tfs checkin 命令搭配使用:

Argument

Description

-m, --message

Write a commit message to detail the changes brought to the projects. The commit message is mandatory.

-d, --directory

The working directory where the projects are being checked in. If a working directory isn’t specified, the current environment directory is used.

-f, --files

The paths to the files that you edited. The paths should be relative to the working directory and separated by semicolons.

更新较旧的自动化项目

在利用命令行用户界面安装依赖项到使用 v2018.3 之前的 Studio 版本创建的项目中时,请考虑以下细节:

  • If the project was not published and consequently, it doesn’t have any installed dependencies, the migration process steps in and installs the default packages, detailed in the Managing Dependencies page.
  • 如果项目是使用 v2018.3 之前的 Studio 版本创建并发布的,则 UiPath.Core.Activities 包将迁移到 UiPath.System.ActivitiesUiPath.UIAutomation.Activities

Updated 4 days ago


批量更新命令行参数


建议的编辑仅限用于 API 参考页面

You can only suggest edits to Markdown body content, but not to the API spec.