Board index » delphi » Run external App?

Run external App?

This should be easy but I can't figure it out for the life of me.  I just
want to execute another external app.  I don't want to multi-thread just run
it.  How do I do that??

Thnx

 

Re:Run external App?


Quote
"John Parrott" <jo...@elysiumfsi.com> wrote in message

news:AVDp4.39188$45.2128972@news2.rdc1.on.home.com...

Quote
> This should be easy but I can't figure it out for the life of me.  I just
> want to execute another external app.  I don't want to multi-thread just
run
> it.  How do I do that??

Add ShellAPI to a uses clause and use ShellExecute or use CreateProcess.
ShellExecute is easy to use but you can't wait for the program to finish.
CreateProcess has a lot more options and returns an id that can be used by
WaitForSingleObject if the calling program has to wait for the external
program to finish.
Quote

> Thnx

Re:Run external App?


If you're looking for  your app to wait for the other program then visit
DelphiLand at www.festra.com and get the 'exewait' package. It comes with
all the functions you need.

Have a day...
-Kejdee-

Re:Run external App?


Hi,

use the WinExec API. you can also use CreateProcess,  but it is very complex.

Regards,
Amir

Quote
John Parrott wrote:
> This should be easy but I can't figure it out for the life of me.  I just
> want to execute another external app.  I don't want to multi-thread just run
> it.  How do I do that??

> Thnx

Other Threads