-
I need to install mysql in my system in the first step
-
After installing or modifying the mysql in the system , I need to the run the data base scripts.
The problem here is db scripts started running before mysql setup completes.
I have tried different ways.. using auto run methods…using processes etc
can anybody tell me how to capture the (child)process id which is invoked by the current process(parent). Here in my case parent is invoking child process and exiting.
System.Diagnostics.Process has a method WaitForExit.
Edit: To also watch for subprocesses, you can use Win32 Job objects. If you create a process in a job, all of its child processes will also belong to the job (unless someone explicitly detaches them). You can monitor the job for events such as process creation and termination. There is a C# wrapper for job objects, JobObjectWrapper.