Gow*_*nSS 0 .net c# batch-file
我使用以下命令来运行bat文件:
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = false;
p.StartInfo.FileName = "d:/my.bat";
p.Start();
p.WaitForExit(2000000);
p.Close();
p.Dispose();
Run Code Online (Sandbox Code Playgroud)
我的问题是我需要等到上述过程完成并尽快关闭它.
有什么建议?