我在UiPath中有一个自动化PyCharm的进程,这是一个非常简单的过程,比如只运行一个Python并将运行消息复制到一个文本文件中。现在,我想将它转换为一个二进制文件,以便在windows机器上执行。
我知道UiPath确实可以将项目导出到可执行文件中,但遗憾的是,它也被删除了。
我还复习了的UiPath编排器,但这对我来说确实很有意义。我不明白为什么一家公司会删除如此关键的特性(转换为可执行文件),并提供这样一个混乱的解决方案。可能是我错过了什么。
我的问题是..。
是否有任何解决办法,任何第三方技巧,可以将UiPath项目转换为windows可执行文件。
发布于 2020-06-17 14:54:06
UiPath确实是,而不是,希望用户能够直接运行可执行文件。他们迫使用户使用使用Orchestrator。因此,他们总是对用户和他们的许可模式有完全的控制。如果他们仍然提供可执行的方式,有人可以很容易地创建一个任务与UiPath和发送到任何其他PC无需使用UiPath帐户。所以这主要是他们停止提供这种方法的原因。但是,您仍然有一些其他选项来运行您的过程,所以不要担心。
这些方法是:
UiRobot.exe_Path /file:"Main.xaml"将运行您的进程。如您所见,您有几个选项,但不幸的是,exe解决方案只是批处理文件的包装器。
我建议您使用Orchestrator,因为它为您提供了对进程的许多可能性和控制以及良好的日志记录。
发布于 2020-06-17 16:25:39
最简单的方法是在批处理文件中调用UiPath机器人命令行接口。我建议您首先打包流程,然后使用带有UiPath.exe execute参数的--process {Package_ID}命令在批处理文件中引用该包。您可以将UiPath.exe添加到PATH环境变量中,这样就不需要对批处理文件中的exe使用绝对路径。批处理文件将能够像可执行文件一样在Windows上运行。或者,您可以向UiPath.exe添加快捷方式,并将参数添加到快捷方式的属性菜单中的快捷方式的目标中。
发布于 2021-06-11 17:33:48
为此,我使用了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"
https://stackoverflow.com/questions/62423511
复制相似问题