在.Net中,如何创建一个后台执行的进程?
在.Net中,创建一个进程十分容易。但是如果你想创建一个没有窗口的后台进程,你需要对ProcessStartInfo进行一些特殊的设置:
var process = new Process() { StartInfo = new ProcessStartInfo("executable file name", "arguments") { CreateNoWindow = true, UseShellExecute = false } };
在.Net中,创建一个进程十分容易。但是如果你想创建一个没有窗口的后台进程,你需要对ProcessStartInfo进行一些特殊的设置:
var process = new Process() { StartInfo = new ProcessStartInfo("executable file name", "arguments") { CreateNoWindow = true, UseShellExecute = false } };