Use Application/Browser Does Not Launch .EXE

I recently started developing with StudioX and have run into an odd issue that I cannot seem to figure out. I am using the Use Application/Browser activity and the app will not open. Here is the one block code, with properties shown:


Selector = “”

Any ideas why the app will not open?

Try first to open the process using the Start Process activity and then use the use application.

Example (you need to adapt with your path):
image

https://docs.uipath.com/activities/other/latest/ui-automation/start-process

Hi,

Which value did you set Open property? How about to set Always?

Regards,

It looks like StudioX does not have Start Process activity. Could it be called something else in this version of the software?

Yes, I selected the Always option from the drop-down. The option displays as ‘NAppOpenMod’.

HI,

It may not be very good way, but we can double click icon of the application on Desktop to launch it, then attach the window using UseApplicationBrowser activity with open mode is IfNotOpen.

Regards,

Double-clicking around scares me :smile:

I was using Powershell to basically serve as the Start Process activity Marian described, but I guess I am wondering why UiPath refuses to launch the .exe through the activity. I would like to gain confidence in the software and understand the inconsistency.

@scott.fueston

Check if application needs any start up parameters or see if there is any other dependency that is needed before opening th wapplication…check in the task manager to know the details

Cheers

Can you double check the Open option to be set to N.AppOpenMopde.IfNotOpen or N.AppOpenMopde.IfNotAlways?

Hello @scott.fueston ,

As mentioned in other answers, this error can occur if the Open property is set to N.AppOpenMode.Never and the application is not already opened when running the workflow.

I was able to replicate your issue by using this configuration, and with DoubleUI application closed. I got this error message:

One other possible cause for getting this error would be if you edited the Selector generated after indicating the application, and the current Selector doesn’t match the application window.
From your screenshot, I noticed you have “Match exact title: N/A”. This means you deleted the title tag from the generated selector. Please note that it is not necessary to delete this tag, as by default it will match the window with the closest matching title, unless you select the “Match exact title” checkbox.
I also observed that the Output element property has an empty value and I don’t know how you succeeded to delete it.

I also reproduced your error when I indicated the DoubleUI application window and edited the Selector property of the activity like this:

In my case, the DoubleUI application was opened, but when trying to match the application window with the selector <wnd app='client.exe' />, it gave me an error similar to yours.

As a conclusion, please try to add a new Use Application/Browser activity, indicate the application window, and do not modify the values for the properties Selector and Open. This should open your app, as the default value for the Open property is N.AppOpenMode.IfNotOpen. It will also work if you set it to N.AppOpenMode.Always, but not to N.AppOpenMode.Never.

Best regards,
Luiza

In terms of the Open > Never config, I have not setup the activity using that option, so I think that is notable for the error generation but not related to my current issue.

The title tag (Match exact title: N/A) does have my attention! I setup a new activity and only changed the Open > IfNotOpen option. See how the title tag is still N/A. I did not delete or modify anything.

Hi @scott.fueston ,

Sorry for the late reply. From your last screenshot I see the selector for the application window doesn’t contain the title attribute. And because the title is missing, you have the “Match exact title: N/A” for the checkbox. But if this is the generated selector, the Use Application activity should be able to open the window by using it.
If you start the Selector Editor from the button on the right of the Selector, does it show to be valid (Validate button is green) when you have the application open?

Please click the Open in UI Explorer link from the Selector Editor and send a screenshot.

Best regards,
Luiza

Right-click your desktop shortcut and select Properties. Send us a screenshot of how the shortcut is configured. That will show us how to configure the Use Application/Browser activity.

Are you indeed sure that the application is not open? I realize the window might not be there, but many applications run in the background. For example close teams and its still running in the system tray. It could be this application is running in the background and as such UiPath doesn’t try to open it, the window however is missing and then it does run.

Check that in the Task Manager perhaps.
Regarding the selector, thats easy to validate. Open the application manually and see if your code works. If it still doesn’t even when it is open your selector is bad, otherwise that is not the issue.