1

I have a process in UiPath to automate PyCharm, a really simple one like just running a Python script and copying the run message into a text file. Now I want to convert it into a binary file to be executed on a windows machine.

I came to know that UiPath did have an option for exporting projects into executable files but sadly it was also removed.
I also reviewed the orchestrator for UiPath but that does seem meaningful to me. I didn't understand why a company would remove such a crucial feature (conversion to executable) and provide a messy solution like this. May be I'm missing something.


My question is....

Is there any workaround, any third party trick that can convert an UiPath project into windows executable file.

Community
  • 1
  • 1
Shabbir Hossain
  • 107
  • 1
  • 11

3 Answers3

2

UiPath does not want users to be able to run executables directly. They are forcing users to use Orchestrator. So they always have the full control about the users and their licensing model. If they would still offer the executable way, someone could easily create a Task with UiPath and send this to any other PC without using a UiPath account. So this is mainly the reason they stopped offering this method. But you still have some other options to run your process so don't worry.

Those ways are:

  1. Use Orchestrator. Run process from your Orchestrator dashboard (via Jobs manually or time triggered or even another starting trigger).

  2. Use Orchestrator and use UiPath Robot (comes already with the UiPath installation). Now you can simply start it from tray icon.

  3. Use UiPath Studio and start process from here.

  4. Create a batch file that runs the start command script for your process. This line UiRobot.exe_Path /file:"Main.xaml" will run your process.

  5. Create a Visual Studio application (exe) that runs the batch file from #4.

  6. Use REST API to run the process.

As you can see you have several options but unfortunately the exe workaround is just a wrapper for the batch file.

I would recommend you to use Orchestrator, as it gives you so many possibilities and control on your processes and a good logging.

kwoxer
  • 3,734
  • 4
  • 40
  • 70
  • I'm really grateful to you for such a detailed explanation. Among all the options above no 5 seems the most appealing one to me. Since it is based on no 4, I'd request you to provide me a little bit more info about it. 1. Can I install UiRobot without having the UiPath studio and obviously without the Orchestrator? – Shabbir Hossain Jun 18 '20 at 15:26
  • 2. Can I attach a process to an RPA as a small module if I am choosing this way of running the UiPath project?(which would be possible if I was able to convert it into an .exe) 3. If I can attach it to an RPA, would that require just the UiRobot installed on the machine or more? – Shabbir Hossain Jun 18 '20 at 15:36
  • 1
    Answering #1: well first the steps depend heavily on the version you want to use. 2 years ago this was possible very easily. You can find it in older docs. But going with the time and taking the latest UiPath version, this is now as follows: 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).` – kwoxer Jun 18 '20 at 18:51
  • 1
    Answering #1: find the UiPathPlatformInstaller.exe docs here: https://docs.uipath.com/installation-and-upgrade/docs/studio-install-studio . The Regutil.exe is in the UiPath folder and be used for communicating with UiPath. – kwoxer Jun 18 '20 at 18:51
  • 1
    #2 and #3 are unclear to me. And should better be asked as questions instead of comments. So if this really matters still, please create new questions and giving some more infos about it what you really want to achieve at the end with your RPA. – kwoxer Jun 18 '20 at 18:57
  • Thanks for your answer. The answer of no 1 is saying a lot. – Shabbir Hossain Jun 21 '20 at 04:01
  • "Now activate the license with the Regutil.exe", This part of your answer I missed earlier. Now when I just installed the UiRobot using the `UiPathPlatformInstaller.exe`, and tried to run the NUPKG file that I exported from the UiPath studio, it says **A local license is required**. I'm curious that can't I use it without a license _like I was able to do the same thing with the UiRobot that comes within the **UiPath community edition** installation_? – Shabbir Hossain Jun 30 '20 at 10:51
  • 1
    The community edition is free. Simply add your licence and it should work. https://forum.uipath.com/t/activate-community-edition-license/232702 – kwoxer Jun 30 '20 at 11:21
1

The simplest way to do this would be to call the UiPath Robot Command Line Interface within a batch file. I suggest that you package the process first and then refer to that package in the batch file using the UiPath.exe execute command with the --process {Package_ID} argument. You can add UiPath.exe to your PATH environment variable so you don't need to use an absolute path to the exe in your batch file. The batch file will be able to run on your Windows VM just like an executable. Alternatively, you could add a shortcut to UiPath.exe and add the arguments to the target of the shortcut in the properties menu of the shortcut.

Joe Iaquinto
  • 13
  • 1
  • 5
0

I'm using AutoHotkey script for this purpose and thought I'd share my method,

Create a *.ahk script using below code,

#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

Then create a task schedule as per your desired trigger and use following in action tab,
Program/Script: "C:\Program Files\AutoHotkey\AutoHotkey.exe"
Add Arguments (optional): "Script_path\Script_name.ahk"

Some53
  • 73
  • 5