执行CMD命令

p.StartInfo.FileName = "cmd.exe";

p.StartInfo.Arguments = "/c" + args;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();

原文地址:https://www.cnblogs.com/Robbery/p/1889195.html