- Mar 22, 2013
- 9,142
- 10,489
I use a BAT file to kill Firefox browsers that are stuck on "Not Responding".
I have this very simple BAT file:
When I run it, it checks all the "firefox.exe" running on the computer, and it Kills the ones that are showing "Not Responding" in task manager.
It works well.
---
The problem is that sometimes a browser could go "Not Responding" for a couple of seconds, and then return to normal function. And if the BAT file runs during those couple of seconds, it will kill that browser. I don't want that.
Is there a way for the BAT code to do like a double check on all the browsers, like 10 seconds apart between checks, and only close the browsers that are stuck on "Not Responding" during both checks?
I have this very simple BAT file:
Code:
@echo off
taskkill /im "firefox.exe" /fi "STATUS eq NOT RESPONDING" /f >nul
When I run it, it checks all the "firefox.exe" running on the computer, and it Kills the ones that are showing "Not Responding" in task manager.
It works well.
---
The problem is that sometimes a browser could go "Not Responding" for a couple of seconds, and then return to normal function. And if the BAT file runs during those couple of seconds, it will kill that browser. I don't want that.
Is there a way for the BAT code to do like a double check on all the browsers, like 10 seconds apart between checks, and only close the browsers that are stuck on "Not Responding" during both checks?