P
PiotrKolodziej
Hi
I have a process that output i need to save in file.
Its a ping.exe. Iam sending 4 packets, and waiting for the process to exit.
First i tried to add arguments to the proces in such a way:
psi.Arguments = "192.168.1.1 > file.txt";
It didnt work.
So i tried to redirect output to the file by:
myProc.StartInfo.RedirectStandardOutput = true;
myProc.StartInfo.UseShellExecute = false;
myProc.Start();
string output = myProc.StandardOutput.ReadToEnd();
myProc.WaitForExit();
Now i can create file but problem is that user cannot see the progress. What
if ill send 30 packets?
How can i get the process output beeing able to see the progress of process
execution?
I would be grateful for reply.
Piotr Kolodziej
I have a process that output i need to save in file.
Its a ping.exe. Iam sending 4 packets, and waiting for the process to exit.
First i tried to add arguments to the proces in such a way:
psi.Arguments = "192.168.1.1 > file.txt";
It didnt work.
So i tried to redirect output to the file by:
myProc.StartInfo.RedirectStandardOutput = true;
myProc.StartInfo.UseShellExecute = false;
myProc.Start();
string output = myProc.StandardOutput.ReadToEnd();
myProc.WaitForExit();
Now i can create file but problem is that user cannot see the progress. What
if ill send 30 packets?
How can i get the process output beeing able to see the progress of process
execution?
I would be grateful for reply.
Piotr Kolodziej