在后台运作流程

时间:2014-12-11 15:04:49

标签: c# c#-4.0

我正在使用C#运行另一个.exe应用程序。

但是我想在后台运行.exe 我试过开始信息隐藏它没有帮助

我该怎么做?

目前这是我正在使用的代码

_p = new System.Diagnostics.Process();
_startInfro = new System.Diagnostics.ProcessStartInfo();
_startInfro.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;                       
_startInfro.FileName = tmp[0];
_startInfro.Arguments = deleteRangeCommand;
_p.StartInfo = _startInfro;
_p.Start();

1 个答案:

答案 0 :(得分:1)

由于我没有提供您想要启动哪个.exe的信息,因此无法确定此答案。但是CreateNoWindow属性看起来就像你需要的那样。

您还必须将UseShellExecute属性设置为false,如文档中所述。否则,CreateNoWindow的值将被忽略。