set nameService=%1 set path=%2 %windir%\system32\TASKKILL.EXE /F /FI "SERVICES eq %nameService%" echo %errorlevel% > %path%