R
robiman
Hi,
I'm running an external program using System.Diagnostics Process. This
program creates a PDF file from a CAD file via commandline "me10f.exe -
p filename.mi". But in case of errors the program reports this with a
messagebox, not on the console.
Can someone tell me if it is possible to:
- disable/hide the popup errors from external app?
- catch the error messages via standarderror or some other way?
I have tried debugging this, but with no success - ExitCode is always
0, and I got nothing in StandardOutput and StandardError streams.
string CoCreatePath = @"C:\......\ME10F.exe";
Process proc = new Process();
proc.StartInfo.FileName = CoCreatePath;
proc.StartInfo.Arguments = "-p " + fileName;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.CreateNoWindow = true;
proc.Start();
proc.WaitForExit();
I'm running an external program using System.Diagnostics Process. This
program creates a PDF file from a CAD file via commandline "me10f.exe -
p filename.mi". But in case of errors the program reports this with a
messagebox, not on the console.
Can someone tell me if it is possible to:
- disable/hide the popup errors from external app?
- catch the error messages via standarderror or some other way?
I have tried debugging this, but with no success - ExitCode is always
0, and I got nothing in StandardOutput and StandardError streams.
string CoCreatePath = @"C:\......\ME10F.exe";
Process proc = new Process();
proc.StartInfo.FileName = CoCreatePath;
proc.StartInfo.Arguments = "-p " + fileName;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.CreateNoWindow = true;
proc.Start();
proc.WaitForExit();