Call Command Prompt and Leave Window Open Call Command Prompt and Leave Window Open shell shell

Call Command Prompt and Leave Window Open


This line;

procStartInfo.RedirectStandardOutput = true;

Is what's causing the window to close. Remove this line, or add a handler to the Process.StandardOutput to read the contents somewhere else;

string t = proc.StandardOutput.ReadToEnd();