How can I identify the application fully executed?
-
Dear All, I am using Asp.Net with C# in windows application (VS 2005). I create one test.bat file, which is executed by my application. I am using "System.Diagnostics.Process.Start" to execute test.bat. How can I get the result, that the bat file has been executed and closed. Because, test.bat file is taking few seconds to run and it creates a table with data and gets closed. My application is gets the data from the table, which is done by test.bat and proceed further. I can have good result, if I debug the application. I can not have a good result at run mode. I want to proceed my application, after executed the test.bat file. How can I identify that test.bat file has been executed fully?. What I need to do?. I have to handle threading? Is there any other way? Thanks in adv.
Balasubramanian K.
-
Dear All, I am using Asp.Net with C# in windows application (VS 2005). I create one test.bat file, which is executed by my application. I am using "System.Diagnostics.Process.Start" to execute test.bat. How can I get the result, that the bat file has been executed and closed. Because, test.bat file is taking few seconds to run and it creates a table with data and gets closed. My application is gets the data from the table, which is done by test.bat and proceed further. I can have good result, if I debug the application. I can not have a good result at run mode. I want to proceed my application, after executed the test.bat file. How can I identify that test.bat file has been executed fully?. What I need to do?. I have to handle threading? Is there any other way? Thanks in adv.
Balasubramanian K.
Hi, the Process-class itself contains a method WaitForExit. Using this method the calling application will wait for the process to be finished. To get the output of your process you can redirect the stream by utilizing the StandardOutput-property. Take a look into msdn to get further details: http://msdn.microsoft.com/de-de/library/system.diagnostics.process.aspx[^] Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
Hi, the Process-class itself contains a method WaitForExit. Using this method the calling application will wait for the process to be finished. To get the output of your process you can redirect the stream by utilizing the StandardOutput-property. Take a look into msdn to get further details: http://msdn.microsoft.com/de-de/library/system.diagnostics.process.aspx[^] Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
Yes. It is working fine now. Thanks
Balasubramanian K.