Quastion about Process in C#

S

Saleh Matani

i am starting an exe and want to find out in runtime when that exe end!
Is there a way to wait after start process until it end ?


// MY CODE:

string currentPfxPass ="MyPass"
string pfxDir =@"C:\MypfxFile.pfx";

ProcessStartInfo startInfo = new ProcessStartInfo("ImportPFX.exe");
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments =" " +pfxDir+ " "+currentPfxPass;
Process.Start(startInfo);

thank you

Saleh Matani
 
S

Simon Watson

Saleh Matani said:
i am starting an exe and want to find out in runtime when that exe end!
Is there a way to wait after start process until it end ?


// MY CODE:

string currentPfxPass ="MyPass"
string pfxDir =@"C:\MypfxFile.pfx";

ProcessStartInfo startInfo = new ProcessStartInfo("ImportPFX.exe");
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments =" " +pfxDir+ " "+currentPfxPass;
Process.Start(startInfo);

thank you

Saleh Matani

Take a look at the WaitForExit member of the process class,

Simon
 

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