I am trying to create a process to execute command line command, and redirect the result to the process stream reader...
The problem is I cannot hide the command (dos) window... even I setup WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
Here is my code ...
Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "p4";
myProcess.StartInfo.Arguments = @"-p testServer:1234 -c test_client files C:\test.xml";
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.RedirectStandardOutput = true;
myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
string output = myProcess.StandardOutput.ReadToEnd();
Could you help me to hide the command window?
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.