Ending stubborn processes in DOS
Ever had that process that wouldn't go down without a fight? You've tried relentlessly to end the process through task manager with no success... You see End Process Tree and you said, "Oh well, might as well since I can't do anything else" and you click it. Next thing you know you get the infamous Blue Screen of Death and your computer crashes. You start your computer in safe mode (just to be safe) and hope all is well but it does it again... Such a tool exists that is as powerful as administrative control if not more.... Behold the power of DOS!!! Also called cmd, command prompt, run (which is incorrect), and DOS (Not denial of service, that was the 80s). Let's say for instance that you want to kill notepad.exe in dos. Open the command prompt (cmd) or open run and type cmd.
So you get this fancy - or lack thereof - black box with a stoic blinker and an archaic C:\> You think to yourself, "what am I doing here?!" There's a purpose behind this, I assure you! The command for killing a task in cmd is cleverly called "taskkill" (minus the " and ", of course). Note: If you type taskkill/? it will give you more information on taskkill command and any other command that you type e.g. cmd/?, ipconfig/?, winver/?, etc... I strongly recommend that you type this before proceeding, unless you happen to know the proper syntax.
As we can see, there are many choices that we can use and each serves its own special purpose in terminating a process. Our first example will be terminating notepad.exe using it's Image Name (IM).
Open Notepad.exe and open cmd.exe
Type taskkill/? for the example to see or continue reading....
Our proper syntax will be the following: taskkill /IM notepad.exe and the process will terminate with a success or failure message and then the PID. In order to kill a process and all child processes started by that process, we can use a different syntax, example: taskkill /IM notepad.exe /T and if we want to forcefully kill a process (which you might have to use) our example would look like taskkill /F /IM notepad.exe /T
For the sake on example, let us say that we don't know the image name but we do know the PID or we want to kill multiple processes without typing each IM. In vista, go the view > select columns > Process ID
XP users should also have a PID option. Example syntax:
taskkill /F /PID 5644 /PID 2216 /PID 1253 /T this will kill the following PID: 5644, 2216, & 1253 with a forceful termination and terminating all child processed started by it's parent process.