Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-23
4
Medium Priority
?
837 Views
Last Modified: 2013-12-16
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.
0
Comment
Question by:margajet24
  • 2
4 Comments
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 400 total points
ID: 21849179
I don't believe that you can get UseShellExecute and RedirectStandardError to work together.
0
 
LVL 10

Accepted Solution

by:
margajet24 earned 0 total points
ID: 22068002
my groupmate was able to fix this..i dont know yet how he did it

but thanks for the info..
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 22102453
It would be interesting to know how this was eventually solved, because I didn't think that it was possible.
0
 
LVL 2

Expert Comment

by:katlin924
ID: 22258886
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. =)
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question