【问题标题】:Can UiPath process be converted into binary executable?UiPath 进程可以转换成二进制可执行文件吗?
【发布时间】:2020-10-06 22:45:14
【问题描述】:

我在 UiPath 中有一个流程来自动化 PyCharm,这是一个非常简单的流程,就像运行 Python 脚本并将运行消息复制到文本文件中一样。现在我想把它转换成一个二进制文件在windows机器上执行。

我知道 UiPath 确实有一个将项目导出为可执行文件的选项,但遗憾的是它也被删除了。
我还查看了 UiPath 的 orchestrator,但这对我来说似乎很有意义。我不明白为什么一家公司会删除如此重要的功能(转换为可执行文件)并提供这样一个凌乱的解决方案。 可能是我遗漏了什么。


我的问题是……

是否有任何解决方法,任何可以将 UiPath 项目转换为 windows 可执行文件的第三方技巧。

【问题讨论】:

    标签: uipath uipath-studio


    【解决方案1】:

    UiPath 确实希望用户能够直接运行可执行文件。他们强迫用户使用 Orchestrator。因此,他们始终可以完全控制用户及其许可模式。如果他们仍然提供可执行方式,那么有人可以轻松地使用 UiPath 创建任务并将其发送到任何其他 PC,而无需使用 UiPath 帐户。所以这主要是他们停止提供这种方法的原因。但是您还有其他一些选项可以运行您的流程,所以不用担心。

    这些方法是:

    1. 使用 Orchestrator。从您的 Orchestrator 仪表板 运行流程(通过作业手动或时间触发,甚至另一个启动触发器)。

    2. 使用 Orchestrator 并使用 UiPath Robot(UiPath 安装中已提供)。现在您可以简单地从托盘图标启动它。

    3. 使用 UiPath Studio 并从这里开始处理。

    4. 创建一个 batch 文件,为您的进程运行启动命令脚本。这行UiRobot.exe_Path /file:"Main.xaml" 将运行您的进程。

    5. 创建一个 Visual Studio 应用程序 (exe),运行 #4 中的批处理文件。

    6. 使用REST API 运行进程。

    如您所见,您有多种选择,但不幸的是,exe 解决方法只是批处理文件的包装。

    我建议您使用 Orchestrator,因为它为您提供了很多可能性和对流程的控制以及良好的日志记录。

    【讨论】:

    • 非常感谢您提供如此详细的解释。在以上所有选项中,第 5 项对我来说似乎是最吸引人的。由于它是基于 4 号的,所以我要求您向我提供更多有关它的信息。 1. 我可以在没有 UiPath studio 且显然没有 Orchestrator 的情况下安装 UiRobot 吗?
    • 回答 #1:首先,这些步骤很大程度上取决于您要使用的版本。 2 年前,这很容易实现。您可以在旧文档中找到它。但随着时间的推移,采用最新的 UiPath 版本,现在如下:Go UiPathPlatformInstaller.exe, launch it, choose “UiPath Studio & Robot”, going to “advanced”, disabling the “UiPath Studio” and letting only “UiPath Robot” enabled. Now activate the license with the Regutil.exe command line (need to be connected to Internet for this one).
    • 回答 #1:在此处找到 UiPathPlatformInstaller.exe 文档:docs.uipath.com/installation-and-upgrade/docs/…。 Regutil.exe 位于 UiPath 文件夹中,用于与 UiPath 通信。
    • #2 和 #3 我不清楚。并且最好作为问题而不是 cmets 提出。因此,如果这仍然很重要,请提出新问题并提供更多信息,说明您最终希望通过 RPA 实现什么。
    • 社区版是免费的。只需添加您的许可证,它应该可以工作。 forum.uipath.com/t/activate-community-edition-license/232702
    【解决方案2】:

    最简单的方法是在批处理文件中调用UiPath Robot Command Line Interface。我建议您先打包该过程,然后使用带有--process {Package_ID} 参数的UiPath.exe execute 命令在批处理文件中引用该包。您可以将 UiPath.exe 添加到 PATH 环境变量中,这样您就不需要在批处理文件中使用 exe 的绝对路径。批处理文件将能够像可执行文件一样在您的 Windows VM 上运行。或者,您可以为UiPath.exe 添加一个快捷方式,并在快捷方式的属性菜单中将参数添加到快捷方式的目标。

    【讨论】:

      【解决方案3】:

      我为此目的使用AutoHotkey 脚本,并认为我会分享我的方法,

      使用下面的代码创建一个*.ahk 脚本,

      #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
      ; #Warn  ; Enable warnings to assist with detecting common errors.
      #SingleInstance force
      SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
      SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
      SetTitleMatchMode,2
      DetectHiddenWindows, On
      ; you don't need to modify below code unless UiPath Studio changes its shortcut name
      EnvGet, LocalFolder, LocalAppData ;use windows Env variable to get local appdata folder
      UiPath=%LocalFolder%\UiPath
      UiPath_ShrtCut=%A_Programs%\UiPath Studio.lnk
      UiPath_Prcss:="UiPath.Studio.exe"
      UiPath_Asstnt:="UiPath.Assistant.exe"
      FileGetShortcut, %UiPath_ShrtCut%, , OutDir ;get parent directory of shortcut.lnk
      
      ;modify your_script_path\Main as per your script and its path
      Script=""%OutDir%\UiRobot.exe" "-file" "your_script_path\Main.xaml"" ;script folder and script name
      
      ; you can add additional clause in here
      If (FileExist(UiPath) "D") 
          {
          
              Process, Exist, %UiPath_Asstnt%
              if ErrorLevel = 0
      
                  {   
                      Runwait, %UiPath_ShrtCut%
                      WinWait, ahk_exe %UiPath_Asstnt% ;wait for UiPath.Assistant to load
                      Sleep, 2500
                      Runwait, %comspec% /c TASKKILL /im %UiPath_Prcss% /f ,,Hide ;now kill UiPath main window
                      ;Run, %A_AHKPath% %Rec_Script% ;run record
                      Run, %comspec% /c %Script%,,Hide
                  }
                  
              else
                  {
                      ;Run, %A_AHKPath% %Rec_Script% ;run record
                      Run, %comspec% /c %Script%,,Hide
                  }
      
          }
      return
      

      然后根据您想要的触发器创建任务计划并在操作选项卡中使用以下操作,
      程序/脚本:"C:\Program Files\AutoHotkey\AutoHotkey.exe"
      添加参数(可选):"Script_path\Script_name.ahk"

      【讨论】:

        猜你喜欢
        • 2021-07-25
        • 1970-01-01
        • 2013-12-02
        • 1970-01-01
        • 2023-03-30
        • 2019-11-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多