"End Process" on the Processes-Tab calls TerminateProcess which is the most ultimate way Windows knows to kill a process.
If it doesn't go away, it's currently locked waiting on some kernel resource (probably a buggy driver) and there is nothing (short of a reboot) you could do to make the process go away.
Have a look at this blog-entry from wayback when: http://blogs.technet.com/markrussinovich/archive/2005/08/17/unkillable-processes.aspx
Unix based systems like Linux also have that problem where processes could survive a kill -9 if they are in what's known as "Uninterruptible sleep" (shown by top and ps as state D) at which point the processes sleep so well that they can't process incoming signals (which is what kill does - sending signals).
Normally, Uninterruptible sleep should not last long, but as under Windows, broken drivers or broken userpace programs (vfork without exec) can end up sleeping in D forever.
"End Process" on the Processes-Tab calls TerminateProcess which is the most ultimate way Windows knows to kill a process.
If it doesn't go away, it's currently locked waiting on some kernel resource (probably a buggy driver) and there is nothing (short of a reboot) you could do to make the process go away.
Have a look at this blog-entry from wayback when: http://blogs.technet.com/markrussinovich/archive/2005/08/17/unkillable-processes.aspx
Unix based systems like Linux also have that problem where processes could survive a kill -9 if they are in what's known as "Uninterruptible sleep" (shown by top and ps as state D) at which point the processes sleep so well that they can't process incoming signals (which is what kill does - sending signals).
Normally, Uninterruptible sleep should not last long, but as under Windows, broken drivers or broken userpace programs (vfork without exec) can end up sleeping in D forever.
taskkill /im myprocess.exe /f
The "/f" is for "force". If you know the PID, then you can specify that, as in:
taskkill /pid 1234 /f
Lots of other options are possible, just type taskkill /? for all of them. The "/t" option kills a process and any child processes; that may be useful to you.
Videos
I had a similar problem with multiple instances of conhost.exe that I could not terminate with taskkill, even giving the exact pid. I always got the same error, saying that there are no instances of the task.
So I did what Pimp Juice IT suggested in a comment above using the following command, which successfully killed all conhost.exe at once.
wmic process where name="conhost.exe" call terminate
If the process was started from Visual Studio, it's possible that the debugger crashed, but VS still somehow has an attachment to the process, keeping it from being able to be killed. Just shutting down Visual Studio will also shut down the rogue process, in this case.
you must kill child process too if any spawned to kill successfully your process
taskkill /IM "process_name" /T /F
/T = kills child process
/F = forceful termination of your process
The taskkill and powershell (kill) methods didn't work for me; it still said "Access Denied".
I had better luck with this:
wmic process where "name='myprocessname.exe'" delete
Reminder: in a batch file you will need to use the double "%%" instead a single
FOR /F "usebackq tokens=2 skip=2" %i IN (`tasklist /m winsta.dll`) DO taskkill /PID %i
FOR /F "usebackq tokens=2 skip=2" %%i IN (
TASKLIST /FI "IMAGENAME eq tomcat6.exe") DO taskkill /F /PID %%i
will automatically kill the tomcat process.
For Windows XP, Vista, 7:
Basic options overview:
If you know the name:
taskkill /IM (program).exe
If you know the PID:
taskkill /PID ###
Kill all processes by one user (Quinn in this instance):
taskkill /FI "USERNAME eq Quinn"
Taskkill options:
/F- force kill with no confirmation/IM- by program name/PID- by process ID number/FI- by filter:Filter Name Valid Operators Valid Value(s) ----------- --------------- -------------- STATUS eq ne RUNNING | NOT RESPONDING IMAGENAME eq ne Image name PID eq ne gt lt ge le PID value SESSION eq ne gt lt ge le Session number CPUTIME eq ne gt lt ge le CPU time in the format of hh:mm:ss. MEMUSAGE eq ne gt lt ge le Memory usage in KB USERNAME eq ne User name in [domain\]user format MODULES eq ne DLL name SERVICES eq ne Service name WINDOWTITLE eq ne Window title
Modifiers:
eq: equalsne: not equalgt: greater thanlt: less thangt: greater than or equalle: less than or equal
Open task manager, go to the process Tab, highlight the process, hit "end process" button.