WaitForExit doesn't wait

  • Thread starter Thread starter Terry Brown
  • Start date Start date
T

Terry Brown

I am trying to use WaitForExit to determine when an external application I
have launched has exited (duh!). I found examples everywhere and it
seemed simple and this works perfectly:

Dim myProcess As Process = _
System.Diagnostics.Process.Start("notepad.exe")

' wait until it exits
myProcess.WaitForExit()

MessageBox.Show("Notepad was closed at: " & _
myProcess.ExitTime & "." & _
System.Environment.NewLine & "Exit Code: " & _
myProcess.ExitCode)
myProcess.Close()

However, when I substitute the application I want to run for
"notepad.exe", the application runs, but WaitForExit returns immediately.

The application in question is synplify_pro.exe, a synthesis tool that
seems, at first glance, to be a normal windows application.

Any ideas on what is going on here? Any workarounds?


Terry Brown
 
Terry,
I have never tried synplify_pro.exe, however is it a "launcher", that starts
the real exe under the covers then exists right away? Hence the effect you
are seeing?

Do you see synplify_pro.exe listed in Windows Task Manager?

Hope this helps
Jay
 
Terry,
I have never tried synplify_pro.exe, however is it a "launcher", that starts
the real exe under the covers then exists right away? Hence the effect you
are seeing?

Do you see synplify_pro.exe listed in Windows Task Manager?

Hope this helps
Jay

Interesting. synplify_pro.exe does not appeat in task manager.
synplify_pro is an enhanced version of synplify.exe and must run, enable
it's extra features in some mystical manner, then run synplify.exe (which
appears in task manager) and then exit.

thanks for the tip.

Terry
 
Back
Top