C#, sxstrace and the visual studio

326 Views Asked by At

I have a question. Sometimes, there are occurring some side-by-side errors. One help to get the solution for this type of errors, there is a nice tool, called sxstrace.exe.

So when I start my program (TestProgram.exe), which has some errors in the manifest file, so an error is popping up, then I can use sxstrace to get the information, why this error occurs.

But I have one problem. When I start a process with sxstrace.exe in C#, and start my program (TestProgram.exe) with the manifest failure, sxstrace.exe will do not trace any error. Starting sxstrace.exe from shell, it will trace all errors.

Here is the question: Why is that? How can I start sxstrace.exe from C# so it will trace all errors?

EDIT: As far as the C#-program (which is starting a sxstrace process) is starting with admin rights, I suppose, that the sxstrace process also starts with admin rights.

1

There are 1 best solutions below

0
starki On

OK, here is the answer to my question: In my C#-Code, I called my TestProgram.exe (which has the Side-by-Side-Error) with the Property UseShellExecute = false. I had to change it to true.