You can use ShellExecuteEx. The problem with the ShellExecute is
that the handle it returns can be one of two things - really reliable.
On 23 Sep 99 at 21:53, Roger Kay wrote:
> > I would like to place in the oncreate method of a form a check to see if a
> > file exists. If it does not then I would like another program to
> > run before
> > continuing to run my delphi app.
> >
> > I can check to see if the file exists and activate shellexecute,
> > but how do
> > you stop my delphi app from continuing?
>
> Try the Win32 function CreateProcess() and then WaitForSingleObject() on the
> handle it returns. Don't forget to call CloseHandle(). Documentation for the
> above functions should be readily available.
>
> Roger,
>
> ---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
Rohit
======================================================================
CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand
PH (649) 489-2280
FX (649) 489-2290
email [EMAIL PROTECTED] or [EMAIL PROTECTED]
======================================================================
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz