I have a simple batch file like this:
echo off taskkill /im \"test.exe\" /f > nul pause
If \"test.exe\" is not running, I get this message:
You can do this instead too:
tasklist | find /I "test.exe" > nul && taskkill /f /im test.exe > nul