Warum ist mein Prozess ist Beendet Methode nicht aufgerufen wird?

Ich habe folgenden code, aber warum ist das ProcessExited - Methode wird nie aufgerufen? Es ist das gleiche, wenn ich nicht eine Verwendung der Windows-shell (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
}

InformationsquelleAutor der Frage 5YrsLaterDBA | 2010-12-21

Schreibe einen Kommentar