Home » Tips N Tricks

How to kill hanged program from command line [ Windows ]

Task Manager is one good place to kill program which hangs though you can make them auto kill but sometimes its not preferable and sometime even the task manager hangs. Here is a nifty trick which makes you to kill program from command line or windows dos.

Windows has two programs called as Taskkill and Tasklist. While one allows you to kill programs another lists all the programs running  Now you need both of them as taskkill needs a PID or Process ID of that program which can be found through tasklist. So lets give it a run ( Go to command prompt by typing cmd or command and then change to system32 folder windows or WINNT

Task List ( tasklist.exe )

task list for windows

Task Kill ( taskkill.exe)

taskill options

Here are the options for Task Kill

C:\WINDOWS\system32>taskkill /?

TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]

Description:
This command line tool can be used to end one or more processes.
Processes can be killed by the process id or image name.

Parameter List:
/F Specifies to forcefully terminate
process(es).

/PID process id Specifies the PID of the process that
has to be terminated.

/IM image name Specifies the image name of the process
that has to be terminated. Wildcard ‘*’
can be used to specify all image names.

/T Tree kill: terminates the specified process
and any child processes which were started by it.

There are more but you will need 2 of these max. Get the PID from Task List and then kill it forcefully using /F option or /T for child process. This is pretty neat way of killing programs and just needs 10 minutes of learning. Give it a try

Tags: , , , , ,

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/NorwegianÖversätta till Svensk/Swedishहिन्दी अनुवाद करने के लिए/Hindi
Tradueix al català/CatalanTulkot uz latviešu/LatvianPreložiť do slovenčiny/SlovakVertaal aan het Nederlands/Dutchترجمة الى العربية/ArabicTraduzca al Español/SpanishTraduisez au Français/French
Traduca ad Italiano/ItalianTraduza ao Português/Portuguese日本語に翻訳しなさい /Japanese한국어에게 번역하십시오/Korean中文翻译/Chinese Simplified中文翻译/Chinese TraditionalПереклад на українську/Ukrainian
SMS subscribe Print This Post

Posted on 18th March 2008 by Ashish Mohta , A tech blogger who writes about solving day to day problems of people who use computer. He also writes on How to use the applications like Office, PC tips, Online tools,Browsers and more. All posts by Ashish Mohta | Connect with me @ Twitter | Linkedin | Facebook | Stumble | Need more help? Ask your Questions at our Support Center



2 Comments »

Leave your response!

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>