Wait for app to finish

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hi group,

I have a solution with 2 apps. When i run 1 of the apps it starts by
checking for a file. If the file does not exist, it runs the other app
in the solution that generates the file.
This all works fine.

However, what I would like is that the 1st app runs the 2nd and then
freezes until it detects that the 2nd app exits. Is this possible?
 
Daniel said:
However, what I would like is that the 1st app runs the 2nd and then
freezes until it detects that the 2nd app exits. Is this possible?

\\\
Imports System.Diagnostics
..
..
..
Dim p As Process = Process.Start(...)
p.WaitForExit()
///
 
Herfried said:
\\\
Imports System.Diagnostics
..
..
..
Dim p As Process = Process.Start(...)
p.WaitForExit()
///
Excellent thanks! I'll give it a try!
 
Maybe this can help you, make a app2.bat file underr c:\
in the bat file type: pause
Save the file
then put a button on a form and add this to the forms click event

Shell("c:\app2.bat", AppWinStyle.NormalFocus, True)
MsgBox("App2 finished")

I think this is what you want

hth Peter
 

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

Back
Top