मेरे पास निम्नलिखित कोड है, लेकिन ProcessExitedविधि को कभी क्यों नहीं कहा जाता है? यह वही है अगर मैं विंडोज शेल ( startInfo.UseShellExecute = false) का उपयोग नहीं करता हूं ।
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = true;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = path;
startInfo.Arguments = rawDataFileName;
startInfo.WorkingDirectory = Util.GetParentDirectory(path, 1);
try
{
Process correctionProcess = Process.Start(startInfo);
correctionProcess.Exited += new EventHandler(ProcessExited);
correctionProcess.WaitForExit();
status = true;
}
.....
internal void ProcessExited(object sender, System.EventArgs e)
{
//print out here
}