Start-Process 如何等待进程执行完后在执行下一句


PowerShell交流中心分类: Powershell基础Start-Process 如何等待进程执行完后在执行下一句
0
srtwlkj asked 7年 ago

Start-Process
Start-Process
例如创建2个进程,如何等第一个进程执行完再执行第二个。

1 Answers
1
Best Answer
Mooser Lee 管理员 answered 7年 ago

使用-wait参数,比如:

Start-Process notepad -Wait
Start-Process notepad -Wait
srtwlkj replied 7年 ago

谢谢了。