c# 启动外部命令 隐藏窗口
作者:互联网
ProcessStartInfo.UseShellExecute 属性需要设置为true
Process proc = new Process();
proc.StartInfo.UseShellExecute = true;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.RedirectStandardError = false;
proc.StartInfo.RedirectStandardOutput = false;
proc.Start();
proc.WaitForExit();
[参考]
ProcessStartInfo.UseShellExecute 属性
标签:UseShellExecute,false,ProcessStartInfo,c#,外部命令,true,StartInfo,proc,隐藏 来源: https://www.cnblogs.com/ives/p/16378359.html