Skip to main content
LoganPrice
Most Valuable Pathfinder
Most Valuable Pathfinder
December 11, 2023
Solved

Check if Application is Running with Wildcard Path String

  • December 11, 2023
  • 2 replies
  • 293 views

I want to create an IF action that checks if a certain application is running.

 

As you know, this action uses the full path to the executable in order to check if it is running:

 

What if I am using different runner machines, each with their own usernames in the path to the app?

 

I would want to wildcard the part that is variable to avoid the bot breaking.

 

My problem is that wildcards (*) does not seem to work in this instance. For example, if I wildcard the username like below, the bot will not register that the application is running:

 

What would you do to get around this?

Best answer by Abhay Naik

Hi @LoganPrice,

Hope you are doing well!

You can use “Get environment variable” command from “System” package. From there you will be able to store the Username in the variable. This you can use further in your if conditions and commands. This way it will be dynamic and can be used in any machine.

 

Hope this helps!

2 replies

Abhay Naik
Navigator | Tier 3
December 11, 2023

Hi @LoganPrice,

Hope you are doing well!

You can use “Get environment variable” command from “System” package. From there you will be able to store the Username in the variable. This you can use further in your if conditions and commands. This way it will be dynamic and can be used in any machine.

 

Hope this helps!

Abhay Naik
LoganPrice
Most Valuable Pathfinder
Most Valuable Pathfinder
December 11, 2023

Thanks @Abhay Naik , I’ll give that a try.

Automate Everything