Reputation: 2309
PowerShell script has the following
Start-Process "D:\Script\EMAIL_Snapshot_Done.bat" $date, $scr_comp
Start-Process "D:\Script\BATCH_gup.bat"
How to ensure that first Start-Process starts and finishes BEFORE second Start-Process begins?
Upvotes: 0
Views: 704
Reputation: 46730
Something simple like this should do the trick.
Start-Process "D:\Script\EMAIL_Snapshot_Done.bat" $date, $scr_comp -Wait
You would have found this information on TechNet
Wait-Process
could also help but the simplicity of -Wait
should not compare.
Upvotes: 2