Error 128 for TASKKILL means that the process was not found. This is some output that can shed some light (from a Command Prompt):
taskkill /f /im program.exe
ERROR: The process "program.exe" not found.
echo %errorlevel%
128
If you don't care if the process is not found, make error 128 a conditional success.
HTH