It’s likely that you have encountered a non-responsive program in Windows at one point or another. The offending program seems to hang and you can’t do anything in it and you can’t close it. Usually, to solve this, you open the Task Manager and try to end the task on the Applications tab. If that doesn’t work, you try to find the process on the Processes tab, hoping you know the name of the .exe file, and try to end the task from there.

This post shows you a command for killing all non-responsive programs more easily that you can put on a shortcut and on the desktop’s context menu, if desired.

First, we will create a shortcut on the desktop. Right-click on the desktop and select New | Shortcut from the popup menu.

Creating a new shortcut

On the Create Shortcut dialog box, enter the following text into the Type the location of the item edit box:

taskkill /F /FI “STATUS eq NOT RESPONDING”

NOTE: The second letter in “/FI” is a capital “i” as in “Information,” not a lowercase “l” as in “load.”

Click Next.

Entering the location for the shortcut

On the next screen enter a name in the Type a name for this shortcut edit box. We called ours Kill All Tasks. Click Finish.

03_name_the_shortcut

The shortcut is added to the desktop. However, the icon does not match the purpose of the shortcut very well. To change the icon on the shortcut, right-click on the shortcut, and select Properties from the popup menu.

Getting properties for the shortcut

On the Properties dialog box, make sure the Shortcut tab is active and click the Change Icon button.

Properties dialog box for the shortcut

Since the .exe file we used for the command (taskkill.exe) has no icons associated with it, a dialog box displays telling us we need to choose an icon from the list. Click OK.

Taskkill contains no icons message

The Change Icon dialog box displays with a default list of icons available. Select an icon you think is appropriate for your Kill All Tasks shortcut and click OK.

Selecting an icon for the shortcut

The new icon is applied to your shortcut. Now, when a program locks up on you, simply double-click your new shortcut to end the task.

The shortcut with a new icon

If you want to add the same command to the desktop’s context (popup) menu, you can add an entry to the registry.

WARNING: If you are not comfortable with editing the registry, please do not attempt the following procedure. If you edit or delete the wrong thing in the registry, it can be destructive to your system. The context menu item we are adding performs the same exact command as the shortcut you just added.

To open the Registry Editor, select Run from the Start menu.

Selecting Run from the Start menu

On the Run dialog box, enter “regedit” (without the quotes) in the Open edit box and click OK.

10_run_dialog_regedit

Scroll down in the tree on the left until you find the following key, if you are using Windows 7:

HKEY_CLASSES_ROOT\DesktopBackground\Shell

If you are using Windows Vista, find the following key:

HKEY_CLASSES_ROOT\Directory\Background\Shell

Right-click on the Shell folder and select New | Key from the popup menu.

Creating a new key

A new key displays under the Shell folder with the text highlighted, ready to be changed. Give the new key a descriptive name, such as “Kill All Tasks” (without the quotes). This is what will display on the context menu.

New key created

Right-click on the Kill All Tasks key you just created and select New | Key again and call this second new key “command” (again, without the quotes). Your new keys should look similar to the image below.

Sub-key created called command

To edit the value for the command key, double-click on (Default) under Name in the right pane.

Editing the value for the key

On the Edit String dialog box, enter the following text (the same text you applied to the shortcut) in the Value data edit box and click OK.

taskkill /F /FI “STATUS eq NOT RESPONDING”

NOTE: Again, The second letter in “/FI” is a capital “i” as in “Information,” not a lowercase “l” as in “load.”

Entering the command for the key

Close the Registry Editor by selecting Exit from the File menu.

Closing the Registry Editor

Now, when you right-click on the desktop, you will see a “Kill All Tasks” option on the context menu. This option will work the same way as the shortcut you created earlier.

Kill All Tasks on the desktop's context menu

If you decide you don’t want the context menu entry at a later time, open the Registry Editor again, navigate to the Kill All Tasks key that you added and delete the command sub-key.

by Lori Kaufman