How do I wait for a service/process to start before continuing a batch script?
- by Shane McD
I am writing a windows batch script to uninstall some software. However I need to wait after the uninstaller has finished for a service to be restarted before continuing with the next uninstall.
I can make the script wait for the uninstaller to finsh using:-
for /f "usebackq" %%M in ('tasklist /nh /fi "imagename eq %process_1%"') do if not %%M==%ignore_result% goto 1
But I cannot for the life of me figure out how to get the script to then wait for a service to start before continuing the script and running more uninstalls.
I am open to any suggestions.