[英]Start hidden process C#
代码:
System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 4351");
我想把它隐藏起来,我该怎么做?
您可以像这样将WindowStyle
属性设置为Hidden
:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "rundll32.exe";
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
//Start the process
Process proc = Process.Start(startInfo);
祝你好运。
可以像下面的代码一样:
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = ....
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = false;
psi.Arguments =...
psi.UseShellExecute = false;
psi.CreateNoWindow = true; // <- key line
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.