|I want to know how can I kill (or check an application is not responding). I've tried with the tasklist and taskkill commands but those check the proccess not the applications. |
I want to mean, I have got an application which sometimes gets down and I have to kill and get up it. When the application is not running I use ' tasklist /v | find "myApp.exe" ' and the 'myApp.exe'' status process is "Running" so its service is not running.
Attach my batch programming to explain better:
for /F "tokens=1,2,6,7 delims=," %%a in ('tasklist -V -NH -FO CSV ^| find "%1"') do (
if /I "%%~c"=="Not responding" set colgado=true
if "%colgado%"=="true" (
taskkill /PID %%~b 2>NUL 1>NUL
Thanks so much for all.