Running an executable

J

John

Hi

How can I;

1. Check the existence of an exe app in a particular path such as
c:\myfolder\myapp.exe, and

2. Execute the app?

Thanks

Regards
 
D

Douglas J. Steele

If the file exists, Dir("c\myfolder\myapp.exe") will return myapp.exe. If
the file doesn't exist, it will return a zero-length string ("")

If the file exists, you can use the Shell function to execute it.
 
J

John

Is it possible to execute the path in background so it does not delay the
access app execution?

Regards
 
D

Douglas J. Steele

Shell works asynchronously, so it shouldn't delay the application. Is that
not what you're experiencing?

Most people want to know how to make Access wait until Shell has completed!
(For the record, you can do that using the code at
http://www.mvps.org/access/api/api0004.htm at "The Access Web")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top