Bat file version.
tasklist | findstr -i chrome
if %errorlevel%==0 goto okay
@echo Chrome is not running.
goto end
:okay
@echo Chrome is running.
call c:\Myscripts\Cool.bat
:end
Powershell version.
$chrome = Get-Process chrome -ErrorAction SilentlyContinue
if ($chrome) {
"Chrome is running."
cmd.exe /c c:\Myscripts\Cool.bat
} else {
"Chrome is not running."
}