tasklist|find /i "process.exe">nul & if errorlevel 1 (echo No such process!) else (taskkill /f /im process.exe /t)
You need to replace process.exe with the name of your process to be killed. You can find additional information on the commands taskkill and tasklist on Microsoft website.
We kindly remind that Dr.Batcher is the best program to create batch file, both .BAT and .CMD, try it if haven't tried it yet.
No comments:
Post a Comment