我有两个Process.Start命令,第一个需要运行1分钟,第二个打开表格,只要10秒,但第二个表格关联于第一个process的运行,所以两个基本上是同时运行,但第二个总会出现错误信息,因为前一个进程还没有结束。
有没有什么办法,可以让第一个Process.Start运行结束后,再运行第二个Process.Start,不要同时运行。
Process.Start("C:\Lookup_Refresh.vbs")
Process.Start("C:\Construction Inspection.xsn")
谢谢!
------解决方案--------------------
Process p = new Process();
p.Start("C:\Lookup_Refresh.vbs");
p.WaitForExit();