Test if a program is running

tasklist /s %1 | find /I "pccapp.exe" >nul IF %ERRORLEVEL%==0 ping 1.1.1.1 -n 1 -w 1000 >nul ECHO ERRORLEVEL2=%ERRORLEVEL% tasklist /s %1 | find /I "pccapp.exe" >nul IF %ERRORLEVEL%==0 GOTO :PCCRunning
 * PCCRunning