Link to home
Start Free TrialLog in
Avatar of margajet24
margajet24Flag for Singapore

asked on

How to redirect standard error at the same time set UseShellExecute to true?

I have a problem.

Does anyone know mk32 execution?

I am developing a GUI for mk32 cmd execution.
I need to get the standard error of mk32.exe, so I used the following codes:

ProcessObj.StartInfo.UseShellExecute = false;
ProcessObj.StartInfo.RedirectStandardError = true;

It was a success. However, when mk32.exe is compiling correctly, it gets "a dump file error. Win32 error 6". I think it is because of the UseShellExecute property.

How can I get the standard error at the same time set the  UseShellExecute to true?
Thanks for your help.
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It would be interesting to know how this was eventually solved, because I didn't think that it was possible.
TheLearnedOne,

you're correct. It is not possible to do it. So I just made some adjustments to the code.
I just redirected the standard error manually then read an external file for that.

Thanks for the info.

Btw, I am margajet24's groupmate. =)