Join Stack Overflow to learn, share knowledge, and build your career. I want to wait till that application ends process dies and continue my execution. How can I do it? See the MSDN page for the method. It also has an overload where you can specify the timeout, so you're not potentially waiting forever. Or subscribe to the Process. Exited event if you don't want to block?
If that doesn't do what you want, please give us more information about your requirements. You could use wait for exit or you can catch the HasExited property and update your UI to keep the user "informed" expectation management:. WaitForExit should be just what you're looking for I think. I had a case where Process. HasExited didn't change after closing the window belonging to the process.
Start to start another application 'ABC'. There may be multiple instances of the application 'ABC' running at the same time. NLV 7, 25 99 I think you just want this: Noldorin k 41 Jon Skeet k Which is why I referred to WaitForExit first If you are going to use the Process.
Exited event, I believe that you have to configure the process beforehand by setting Process. Though, considering that this question is over three years old, it may be that Process. EnableRaisingEvents was not a thing at the time of it's having been asked. I do the following in my application: There are a few extra features in there which you might find useful AnthonyLambert 6, 3 28 You could use wait for exit or you can catch the HasExited property and update your UI to keep the user "informed" expectation management: Responding that went to false after closing the window like that: Perhaps this helps someone.
Like jon Skeet says use the Process. Sleep 10 ; if proc. David Lopes 15 3. Doesn't really answer the question. Start command ; process. Not only have you wasted your own cycles but you've compelled me to waste mine too.