Hi
I am trying to issue some basic dos commands from insirde of my Form
on a button click. I can get a cmd window opoen but can't seem to
write to it. Can anyone help? Here is my code.
thanks
Zenon
String commandLine = @"c:\";
System.Diagnostics.ProcessStartInfo PSI = new
System.Diagnostics.ProcessStartInfo("cmd.exe");
PSI.RedirectStandardInput = true;
PSI.RedirectStandardOutput = true;
PSI.RedirectStandardError = true;
PSI.UseShellExecute = false;
System.Diagnostics.Process p =
System.Diagnostics.Process.Start(PSI);
System.IO.StreamWriter SW = p.StandardInput;
System.IO.StreamReader SR = p.StandardOutput;
SW.WriteLine("Hi");
//SW.Close();
|