[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

How to wait for the process to complete.

Vineet batta

1/22/2003 9:08:00 AM

Hi ,

i am doing the following :

functionName()
{
System.Diagnostics.Process prStart = new Process();

System.Diagnostics.Process.Start(<Executables>);

prStart.Dispose();
}
catch()
{}
finally
{
//Some Code here
}

Execuable runs in the silent mode and no user interaction.

I want that before the finally block gets executed i
should waite for the process which i started in the above
code to finish.

WaitForInputIdle() -- does not suit here as its meant for
interactive Exe ..like Notepad.exe



Amu ideas ..... are welcome?

regards
Vineet batta

1 Answer

WildHeart'2k <stf

1/22/2003 10:12:00 AM

0

> WaitForInputIdle() -- does not suit here as its meant for
> interactive Exe ..like Notepad.exe

What about WaitForExit()?
And there's also the Exited event...
--
WildHeart'2k3