Jump to content
Sign in to follow this  

Running an application without specifying its full path

Recommended Posts



is there a way to run a third-party Windows application (such as Acrobat Reader, AcroRd32.exe) without specifying its full path?

For instance, I would like to do this:

Run <or any other command>("AcroRd32.exe", "", ...)

instead of

Run("C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe", "", ...).

Like that, I could call any version of Acrobat Reader (7, 8, or 9) on any machine, without knowing its full path.

Many thanks.


Share this post

Link to post
Share on other sites

I just did it with Firefox and it worked fine. Run("Firefox.exe"). I don't have Acrobat Reader or I'd test that for you.

Edit: It fails for Foxit Reader.

Ok well, I'm done, sorry.

*facePALM* Maybe it worked for Firefox becuase I already had it open?

Edited by jaberwocky6669

Share this post

Link to post
Share on other sites

pr1, Unless its added to the initial 'Path' environment string, you'll need to put the full path in. If you want it to be able to be run on other configurations though (where it could be installed to a different folder), you might want to search the registry for any keys that point to the folder and/or executable, and use the path found there.

Share this post

Link to post
Share on other sites

just verify if the application exists then execute it


for $i= 7 to 9
if FileExists("link to app...number of version store in variable $i") then
    Run("C:\Program Files\Adobe\Reader " & $i & ".0\Reader\AcroRd32.exe", "", ...).
Edited by trung0407

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.