ProcessStartInfo psInfo = new ProcessStartInfo(instlLocation, "connect " + sStoreName); psInfo.RedirectStandardInput = true; psInfo.RedirectStandardOutput = true; psInfo.UseShellExecute = false; psInfo.CreateNoWindow = true;
Process process = new Process(); process.StartInfo = psInfo; process.Start();
vin = process.StandardOutput;
I am not able to get the output stream with the above code using vin.Read(), until the process is terminated or I kill the process using below code. Any right help will be greatly appreciated.
process.WaitForExit(10000);
if (process.HasExited == false) { process.Kill(); process.Close(); }
process.Dispose();
.NET Development34
|