用c#调用bat文件,如何不弹出doc窗口呢,
ProcessStartInfo p = new ProcessStartInfo();
p.WindowStyle = ProcessWindowStyle.Hidden;
p.ErrorDialog = false;
p.CreateNoWindow = false;这样doc窗口也会一闪而消失,如何不出现这种情况呢?
请各位dx指教啊。
ProcessStartInfo p = new ProcessStartInfo();
p.WindowStyle = ProcessWindowStyle.Hidden;
p.ErrorDialog = false;
p.CreateNoWindow = false;这样doc窗口也会一闪而消失,如何不出现这种情况呢?
请各位dx指教啊。
p.StartInfo.FileName = "123.bat";
p.StartInfo.WorkingDirectory = workingDirectory;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
我还要给bat文件传递参数呢,这样写如何传参数呢,谢谢