rfazendeiro Posted November 16, 2005 Posted November 16, 2005 hi ti all, I'm currently building an application that is going the execute an external application in batch mode. [csharp] for (i=0;i < 10; i++) { System.Diagnostics.Process.Start(sAppPath,sArgs); } [/csharp] As you can see i need to execute this external application lots of times, but i only want the next series to begin when the other finnishes. how can i do that? can anyone help me on this? Quote
Administrators PlausiblyDamp Posted November 16, 2005 Administrators Posted November 16, 2005 If you create a variable of type Process it has a .WaitForExit property, if this is true it waits till the application has exited before continuing Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Leaders snarfblam Posted November 16, 2005 Leaders Posted November 16, 2005 Just a recommendation: you could create a second thread to wait for a process to end in order to not freeze up your app. Quote [sIGPIC]e[/sIGPIC]
rfazendeiro Posted November 18, 2005 Author Posted November 18, 2005 Thx for the replies! the method WaitForExit() did exactly what i wanted, but noted about the second thread. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.