Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在我的代码中启动一个bat文件
System.Diagnostics.Process.Start(path + ".bat");
如何隐藏该 bat 文件的命令行窗口?
谢谢你。
使用 ProcessStartInfo 进行更多控制,例如
var psi = new ProcessStartInfo(path + ".bat")); psi.WindowStyle = ProcessWindowStyle.Hidden; Process.Start(psi);