Tony_Henrich Tony_Henrich - 1 month ago 15
C# Question

How to get standard output from CreateProcessWithLogonW?

I am using the code from http://www.pinvoke.net/default.aspx/advapi32.createprocesswithlogonw. How do I get the output from the standard output as a string? Like the stuff that shows up when you run it interactively in a command window?

Answer

This post solved it for me. Not the output part but that I got CreateProcessWithLogonW working.

http://blogs.msdn.com/alejacma/archive/2007/12/20/how-to-call-createprocesswithlogonw-createprocessasuser-in-net.aspx