// start your "oui" process and wait for it to pass control to javaw.exe Process oui = Process.Start("oui.exe"); oui.WaitForexit(); // grab processes with the name "javaw" Process[] processes = Process.GetProcessesByName("javaw"); // if you found one, create a Process instance for it and wait until it exits if (processes.Length > 0) { Process javaw = processes[0]; javaw.WaitForExit(); } else { // TODO: add code to run if the javaw process is not found }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)