Before checking ExitCode, you must first check the HasExited property. Otherwise, it will throw an exception.
if (myProcess.HasExited) {
//then check exit code
}
Like @DalmTo, exit codes are application dependent. But by convention, a value of zero equals the equivalent of EXIT_SUCCESS.
source
share