Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using windows 7 prof and I was trying to write unique command I can use for killing the tasks in case my OS gets freezing (what I also see very useful for more admins) What I need to do is to nest multiple filters to one command.


I need to kill all running console tasks (n'1) except of explorer.exe, firefox.exe and vmware.exe. The syntax I used (not successfully) is:

'taskkill /FI "session eq 1" /FI "imagename ne firefox.exe" /FI "imagename ne explorer.exe" /t /f'

It seems like command is not allowing me to use multiple /FI options.
Can anyone please advice what syntax should be used in this specific case? Also I'm sorry if the question is too basic but I've never passed any education regarding commands. Thank you all in advance, in case of any question feel free to ask.

share|improve this question

You could do the command to kill all the programs that are not responding anymore.

taskkill /f /fi "status eq not responding"

I think that you can't kill all the process that are not responding except this three that you had mentioned in just one line.

share|improve this answer
Thank you for your answer. I accept that as a different solution. If anyone would know the way (even if I'd have to use vb or anything else to do it) I'd appreciate another opinion. – Marek Krásavček Eľko Aug 30 '13 at 16:08

Here's a couple tips for later on: I haven't seen any commands built-in into Windows' command prompt that allow for multiple instances of the same switch. Also IMO I would generally kill them one at a time, so I don't kill the wrong thing. Here would be a command I would be quicker to run:

tasklist /fi "status eq not responding"

Then, after I know what isn't responding, I can pick and choose what I want to kill (I don't like the idea of blindly killing system processes). I would, then, run a command like this:

taskkill /f /im "foo.exe"

A way to kill ones that are eating up a lot of RAM (like if Chrome's main process hangs) is through this command or if necessary, tacking on to the command /t, which also knocks out all other processes started by it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .