How to Quickly Shut Down a Hung or Unresponsive Application

Sometimes a Windows program or file will hang and just sit there frozen with none of the menus or functions responding to the mouse or keyboard. There are several ways to close down a hung process but the command prompt provides a very quick and easy one with  “taskkill”. The appropriate command is:

   taskkill /f /fi "status eq not responding"

This command can be entered into the command prompt directly or used to create a one-line batch file. To make the batch file, copy and paste the command given above into a blank Notepad file and save as kill-task.bat. Make sure to save as type “All Files” and with extension .bat, not as a text document. Save the file someplace convenient and simply double-click it if you need to close a hung process. Note that this is a one-step process and does not require that you know the name of whatever is hung up. The command closes anything that is not responding.

Does not apply to Windows XP Home, which lacks the Taskkill command.

Get your own favorite tip published!  Know a neat tech tip or trick?  Then why not have it published here and receive full credit?  Click here to tell us your tip.


This tips section is maintained by Vic Laurie. Vic runs a Windows blog called The PC Informant and also operates a computer education website.

Click here for more items like this. Better still, get Tech Tips delivered via your RSS feeder or alternatively, have the RSS feed sent as email direct to your in-box.

Share this
4.514285
Average: 4.5 (35 votes)
Your rating: None

Comments

by Rain77 on 18. February 2013 - 4:58  (105512)

Just a heads up, this caused a lot of problems for me on windows 7. It seemed to reset some programs to their default settings. Just letting you know.

by JoeF (not verified) on 27. July 2011 - 10:07  (76296)

I like John R's enhanced version as I like to have some view of what's going on. But to be honest, I use Sysinternals Process Explorer, which gives you a very full picture of what Windows is up to, and works with all versions of XP (www.sysinternals.com)

by sbwhiteman on 27. October 2010 - 2:38  (60246)

Taskkill is available on my XP Home SP3 system...

by Faust (not verified) on 26. October 2010 - 22:11  (60233)

Not the best idea to kill every process that is reporting "not responding" -- you may end up killing a process that is momentarily hung along with the target process.

by John R (not verified) on 4. November 2010 - 20:20  (60774)

You can write something a little more complicated in your bat file to introduce a simple safety check using a similar command if this is really a concern:

@echo off
tasklist /fi "status eq not responding"
echo .
set /p ans=kill these tasks? (Type Y to kill tasks)
if %ans%==Y goto kill
goto eof
:kill
taskkill /f /fi "status eq not responding"

You have to type a capital Y, the lower case will bail without killing the tasks, as will any other response besides Y

by v.laurie on 26. October 2010 - 22:40  (60236)

Your suggestion is an unlikely scenario on a typical home system.

by Pszetfurnia (not verified) on 26. October 2010 - 18:16  (60218)

Sometimes when I am trying to open Firefox it turns out that "Firefox is already running but it is not responding". Of course it is not visible then. How can I kill it without opening task manager?

by v.laurie on 26. October 2010 - 18:27  (60219)

The command given in the tip or the related batch file will kill any and all non-responding processes, including Firefox or anything else if it is hung.

by Pszetfurnia (not verified) on 26. October 2010 - 19:29  (60222)

Thank you. I've just created my kill-task.bat file and can't wait for Firefox to stop responding :)

by amado (not verified) on 26. October 2010 - 16:51  (60211)

you can press Ctrl+Alt+Del then end the non running task.

by GL (not verified) on 28. October 2010 - 13:38  (60357)

I like using ctrl-alt-del too. Gives you an idea of what's going on and a *quick* way of killing a process without having to mess with all the switches.

by Vera2 (not verified) on 20. November 2010 - 3:16  (61413)

You haven't learn that some programs cannot be forced to quit?

by v.laurie on 26. October 2010 - 17:49  (60214)

As has already been discussed,your suggestion is neither general nor the quickest.

by Elly (not verified) on 26. October 2010 - 15:32  (60205)

Is there way to do the same but restart instead of just kill?

by Icebird (not verified) on 26. October 2010 - 15:26  (60204)

Forget the .bat file.. put it in AutoHotKey!
^#!c:: Run taskkill /f /fi "status eq not responding"

Also, check it with tasklist first because I had one program reporting Not Responding when it was actually fine. So I added:
/fi "imagename ne GoogleChromePortable.exe"

by Anony (not verified) on 6. December 2010 - 12:14  (62093)

What does ^#!c:: Run taskkill /f /fi "status eq not responding" do exactly? I never used AutoHotkey before.

Can you give example command to assign hotkey to Run taskkill /f /fi "status eq not responding"

by Jak25 (not verified) on 28. October 2010 - 0:03  (60319)

Ok, I should know this, I guess. How do you do this-- assign a command to a HotKey? I'm running Win7 and have been getting quite a number of odd hangups lately, and I run virus scan and malware apps regularly. Thanks!

by v.laurie on 28. October 2010 - 15:14  (60360)

If you can wait, how to assign programs to hotkeys is a subject for another tip.

by DougRH (not verified) on 26. October 2010 - 16:07  (60208)

Environments:
WinXP Pro x32,
Vista Ultimate: 32 & 64,
Win7: 32 & 64

(8 >) Nice tip thanks (< 8)

I made a short cut to it and then assigned a Hot Key combination for it.
Now I'm trying to figure out how to give it an elevated priority?

by Thamza (not verified) on 26. October 2010 - 13:46  (60195)

Thanks for the tip, it sound interesting as I sometimes am forced to terminate non-responsive applications. Cheers!

by ratchet on 26. October 2010 - 13:49  (60196)

I need help with this whole issue on XP Home SP3. Occasionally my machine will be so hung that I can't even open TM via the system tray context menu or C-A-D. Nor have I ever been able to get the Process Lasso type apps to work either. It would be great to have something in Quick Launch to do this. If indeed the XP SP3 tweek does work, could/would someone write the needed script or .bat file or give detailed instructions! Thank you very much!

by DougRH on 27. October 2010 - 10:22  (60271)

It sounds like you either have a registry problem &/or are VERY badly overloading it.
Many people unrealistically expect everything to happen instantaneously on a computer even though it may already be running close to or at full capacity. Or perhaps it is just one app stalling it.

I've found that regular use of registry cleaners/ defragmenters are essential.

Have you tried looking at your task manager before it gets to this state and look at the loads on it? Check the 'Show processes from all users' Approach it sequentially and check on it's condition while you continue to open each app that you normally use. Perhaps you will find one particular app that is freezing it or that have you just reached an accumulative overload.
Some versions of Windows have 'Performance Monitors' that can be started from the Task Manager to assist you.

Maybe you have windows elements damaged / missing? Try the SFC (System File Checker) tip here to restore them.
Good Luck

by GL (not verified) on 28. October 2010 - 13:47  (60358)

Cleaning your registry doesn't really do much of anything and the amount of room saved on your HD is negligible.

For this person the best thing to do is clean out programs that haven't been used in a while using Revo Uninstaller, defrag w/ JK and then reload Windows. To do this just pop your Windows disk in and boot. If you don't have a Windows disk then use your Recovery partition: During Startup, select Recovery Console from the startup options menu.

Alternately run Ubuntu w/ Wine. *The* solution to solving Windows problems. I've yet to find a Windows app that won't run w/ Wine.

by SpiderJon on 26. October 2010 - 13:19  (60191)

TaskKill /FI "STATUS eq NOT RESPONDING" /F /T

will terminate ALL processes that are hung, or dependent on hung ones, which can be a good deal faster and easier than using Task Manger.

by v.laurie on 26. October 2010 - 15:03  (60200)

Well said, SpiderJon. Because others seem to be missing that point, I have added a line to the tip.

by Keith Petersen (not verified) on 26. October 2010 - 8:22  (60177)

Taskkill is available in Windows XP Home SP3. It's in the I386 folder as taskkil.ex_ which must be expanded to taskkill.exe and copied to the SYSTEM32 folder before use.

It should not be necessary to use the full path in your BAT file because SYSTEM32 is in the PATH environment variable.

by kevinau (not verified) on 27. October 2010 - 1:18  (60242)

Hi,

this can be useful. if you have some applications not responding frequently, you can make a batch file to kill it.
Where should the batch file to put if I want to type it in the Run box and it can find it out?

by v.laurie on 26. October 2010 - 15:06  (60201)

Thanks for the information, Keith. I hadn't known that.

by Anand (not verified) on 25. October 2010 - 10:47  (60126)

After I found SuperF4, there is no looking back for quickly closing a hung program or normal program (sometimes which ask too many questions to close this and that first).

http://superf4.googlecode.com/
It is free (donationware).

I am a developer and many times I face hung or program in loop which do not close. SuperF4 allows me to close them and continue without wasting my time.

Anand

by Anony (not verified) on 6. December 2010 - 12:12  (62092)

Tried SuperF4 on new system, let me say it crash my desktop. I can use apps but I lost my taskbar and rightclick use...

Not compatible with Win 7 64bit despite what they claim.

Gizmos Needs You

Gizmo's Freeware is Recruiting

 We are looking for people with skills or interest in the following areas:
 -  Mobile Platform App Reviews for Android and iOS
 -  Windows, Mac and Linux software reviews       Interested? Click here