Waiting for Multiple Processes to End

email me

This is how you would wait for multiple processes to be completed before continuing.

:WAIT
cls
echo Waiting for applications to finish installing…
:: adds timing to the app installs
ping -n 30 127.0.0.1>nul
start /b /wait /LOW c:\windows\system32\TASKLIST.exe /FI “IMAGENAME eq app1.exe” | find /i “app1.exe” && (goto :WAIT)

start /b /wait /LOW c:\windows\system32\TASKLIST.exe /FI “IMAGENAME eq setup1.exe” | find /i “setup1.exe” && (goto :WAIT)

start /b /wait /LOW c:\windows\system32\TASKLIST.exe /FI “IMAGENAME eq cmd.exe” | find /i “cmd.exe” && (goto :WAIT)

start /b /wait /LOW c:\windows\system32\TASKLIST.exe /FI “IMAGENAME eq install.exe” | find /i “install.exe” && (goto :WAIT)

goto :NEXT

:NEXT
echo Do other stuff here
pause