cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lmheimendinger
Resolver III
Resolver III

Power Automate Desktop execute program and pass parameters question

I am trying to set up a desktop flow that I can call from a cloud flow.  What I want that desktop flow to do is pretty simple:

 

  • Run a program
  • Pass the prograam a string parameter

I am not certain I am doing it correctly.

I use Windows Task Manager to run several tasks, all of which launch the same program but each task uses a different parameter string.  Those all work fine, but instead of ONLY running those tasks at fixed intervals, I also need to run them when a flow creates new data that those tasks deal with via a utility.  

 

In the task action, the value is

 

"C:\Program Files (x86)\<directory>\<programname>.exe"  and the arugment is

Item to be processed

The latter has no quote marks, single or double.

For the run application step

 

  1. Should I include the "" marks around the patch and program name or omit them or use single '?
  2. Should the argumet string (parameter) be enclosded in " or ' or have none?

The desktop flow "seems" to run but I am unable to tell for sure.

Long time cloud flow developer but new to desktop.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
lmheimendinger
Resolver III
Resolver III

Problem solved.  The path is set from browsing, so no ' or "".

The argument is just a string, no ' or "

 

When I executed the desktop flow from a cloud flow, I could see nothing on the server session.

 

However, when I manually run the desktop flow, I see the cmd window open and do exactly what I am expecting.

View solution in original post

4 REPLIES 4
lmheimendinger
Resolver III
Resolver III

I have solved half of this problem by simply browsing to the program location (Duh ddn't know the folder icon would do this).  I then created a cloud flow and called the desktop flow from it.  It now runs for about a minute, which is what I expect, but I can find no evidence on the servr that it actually did run. I have simplified the parameter into a string with no spaces, but whether I enclose it in " or ' or neither, the results seem to be the same.

When I monitor the flow, that step really doesn't tell me much.  And I no longer see a command window open on the server.  Not a lot of documentation about run application action for desktop flows....

 

lmheimendinger
Resolver III
Resolver III

Problem solved.  The path is set from browsing, so no ' or "".

The argument is just a string, no ' or "

 

When I executed the desktop flow from a cloud flow, I could see nothing on the server session.

 

However, when I manually run the desktop flow, I see the cmd window open and do exactly what I am expecting.

I had the same issue to open excel files with spaces in their names so I solved that by using triple quotes.

Example:

LucianoGomesBR_0-1667913277107.png

 

good to know! thanks

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,985)