Command line C#-隐藏命令行窗口

Command line C#-隐藏命令行窗口,command-line,hide,Command Line,Hide,我正在用启动代码中的bat文件 系统.诊断.过程.启动(路径+“.bat”) 如何隐藏bat文件的命令行窗口 多谢各位 使用ProcessStartInfo进行更多控制,例如 var psi = new ProcessStartInfo(path + ".bat")); psi.WindowStyle = ProcessWindowStyle.Hidden; Process.Start(psi);

我正在用启动代码中的bat文件

系统.诊断.过程.启动(路径+“.bat”)

如何隐藏bat文件的命令行窗口


多谢各位

使用ProcessStartInfo进行更多控制,例如

var psi = new ProcessStartInfo(path + ".bat"));

psi.WindowStyle = ProcessWindowStyle.Hidden;

Process.Start(psi);