Running an executable

  • Thread starter Thread starter John
  • Start date Start date
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
 
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.
 
Is it possible to execute the path in background so it does not delay the
access app execution?

Regards
 
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")
 
Back
Top