C#隐式运行CMD命令(隐藏命令窗口)

Process p = new Process();//设定调用的程序名,不是系统目录的需要完整路径 
p.StartInfo.FileName = "cmd.bat";//传入执行参数 
p.StartInfo.Arguments = "";
p.StartInfo.UseShellExecute = false;//是否重定向标准输入 
p.StartInfo.RedirectStandardInput = false;//是否重定向标准转出 
p.StartInfo.RedirectStandardOutput = false;//是否重定向错误 
p.StartInfo.RedirectStandardError = false;//执行时是不是显示窗口 
p.StartInfo.CreateNoWindow = true;//启动 
p.Start();
p.WaitForExit();
p.Close(); 
原文地址:https://www.cnblogs.com/fan-yuan/p/10242412.html