Good day!
I run some *.exe file at my programm. This exe file-console app. So, i start it like that:
proc = new Process();
proc.StartInfo.UseShellExecute = true;
proc.StartInfo.RedirectStandardOutput = false;
proc.StartInfo.RedirectStandardInput = false;
proc.StartInfo.FileName = procpath;
proc.StartInfo.Arguments = String.Format("/someParam1:true , _NamePipe1);
proc.Start();
This prgramm starts and then during operations make console output. So, how to write this output into file?I cannot modify foreigh app.
Thank you!
EDIT: The target app have KeyPress func(or so on) and when i run process with this target app (and UseShellExecute==false)- KeyPress think that some key pressed and target app stops (when you enter some key- target app will stop.)
So, what can i do?
c:\>your command > theoutputfile.txt
. Could that be an option in your case ? – Laurent S.