web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Launch application fro...
Power Automate
Answered

Launch application from variable - Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by 36

Hey All,

I wonder if someone might be able to help. I am trying to make a flow that will at first prompt the user to say where a program file is stored. Then I am trying to launch that program using the Run Application action. I cannot seem to get this step to work. I have tried running it from the full directory path. I have also tried splitting the file path into directory and then filename both with and without extension. I get the error in Run application that it much be a file when I try to just use the variable in the application path.

The reason I would like to use a variable to launch the application is because the application name includes the current version for example AppName1.9.5.exe and I would like this flow to be usable as and when the application is updated so having the launch name be dynamic would make this useable with very little tweaking even when the application itself gets updated.

This is my current flow:
LaunchUsingVariable.png

I tried manually adding the .exe to the run application which stopped an error being shown but didn't solve my issue.
RunApplication.png

Any help that can be offered would be greatly appreciated

Kind Regards,
Chris

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Kingston86 

    The code seems fine to me overall. Could you please provide a screenshot or details of the error so that I can assist you further?

     

    If your executable is located within a subfolder, please enable the highlighted toggle below.

    Deenuji_0-1709691494730.png

     

    And please mention the PBDirectory.FullName as highlighted below.

    Deenuji_2-1709691798846.png

    Additionally, verify your executable directory and name manually as shown below

    Deenuji_3-1709691912703.png

    Deenuji_5-1709691984514.png

     

    Then, try hardcoding the same value in the run application to test if it works correctly.

    Deenuji_6-1709692093571.png

     

     

    -------------------------------------------------------------------------------------------------------------------------

    If I've resolved your query, please consider accepting it as the solution and giving it a thumbs up to help others find answers faster.

     

     

  • Kingston86 Profile Picture
    36 on at

    Hi Deenuji,

    Thank you for coming back to me. I have tried the solutions you mentioned above and it gives another error. This error happens both when trying to launch the application as a variable and also from a static address. This is the application folder and its structure:

    ApplicationFolder.png
    Which is located on my desktop. This is the Run Application action set to be a static address:
    RunApplicationWindow.png

    When trying to run the application I am getting the following error. The file it refers to is within the root directory of the application file. I am unsure why it would be trying to find resources outside of this directory. 
    RunError.png

    If I manually click the exe file from within the folder on the desktop, the application opens as expected.

    Thank you again for your help.

    Regards,
    Chris

  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Kingston86 

    Can you please place the exe in some C drive and try the same?

     

     
  • Kingston86 Profile Picture
    36 on at

    Hi Deenuji,

    I placed the file directly in the c: and still getting the same error. Please see below screenshots:

    StillError.pngError2.png

    Kind Regards,
    Chris

  • Verified answer
    Kingston86 Profile Picture
    36 on at

    Hi Deenuji,

    Quick update. The problem has been solved and will work now as a variable as well as a hardcoded directory. The key was also assigning the working folder to be the same as the exe directory as can be seen in the screenshot below. Thank you again for you assistance with this.

    Solution.png

    Kind Regards,
    Chris

  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Kingston86 

     

    I'm pleased to hear that, Chris. Happy Automation! Kindly mark the appropriate answer as the solution for your question so that it can assist others in the future. Thank you!

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard