Check if a process is running. While the process is running, continue to loop until the process is finished.

Ex.: Check if iexplore.exe is running. While iexplore.exe is running, do a loop and check again. and again. When process is finished, do another job (like display "process iexplore.exe is not running".

If you expand your mind this script will help you with application healthcheck like "focuses on running process (or service, why not?), when the running process (or service) become stopped you will receive a advice from this. Can you configure a telnet smtp mail when a process stop, or register a log in Windows Logs. Expand your mind :-)


@echo off 
tasklist.exe | findstr "iexplore.exe" > nul 
if errorlevel 1 ( 
GOTO ...