« Corrupt Windows Icons | Main | Thingamablog »
Tuesday, February 05, 2008
Create Your Own Shortcuts to End Processes and Programs
Do you have an often used program that frequently freezes, requiring that you kill it? Or do you have persistent applications that start-up on their own, even if you have disabled them from the various startup locations in the registry (QuickTime is a good example). If so, you may want to have a quick method for killing these specific tasks without resorting to using the proverbial Windows 3-finger salute -- Ctrl+Alt+Del -- to bring up the Windows Task manager, then wade through the entries to find the correct entry, ending the process, then ending Task manager.
Well, you may not know that you can create quick-kill shortcuts for specific applications using either the built-in Windows command line tool "taskkill", or a third-party command line tool called "taskill" (notice one less 'k'). With the default taskkill, just create a shortcut such as the following example:
taskkill /f /im firefox.exe
Where firefox.exe is replaced by the the application you want to force to quit.
If you are using it to shut down Firefox, however, there is one possible flaw with this solution . Sometimes it is handy to forcefully close Firefox even when it’s not frozen. Forcefully closing Firefox is equivalent to a crash, and Firefox has a built-in option to recover from a crash with your tabs and windows restored. When you use taskkill, however, if the program being killed was NOT frozen it will "gracefully", rather than forcefully close it. That might be great in most cases, but when you use taskkill with Firefox, the next time you start the browser you may not get the option to restore your session. This too is easily overcome if you use a Firefox extension to save your sessions. As far as I have been able to determine the extensions here will all recover your session whether it was gracefully or forcefully closed: Tab Mix Plus and Session Manager. Session Saver, a similar extension, is no longer actively maintained, and it is recommended to use one of the other 2 mentioned.
The taskkill.exe (built-in) is available in many versions of Windows, including Win XP Pro and Vista, but possibly not XP Home. It is usually located in your "Windows/System32" folder.
If your system does not include taskkill, there are other similar tools including tools for Macs, and Linux, special purpose task-killers, such as several tools designed to kill Microsoft ActiveSync, and general purpose task viewers with the ability to kill tasks, such as Process Viewer, Sysinternal's Process Explorer, Task Killer, @KILL, or DTaskManager. Below are a few of the options available for Windows. If you need solutions for another OS, please refer to the articles in the Credits section at the bottom, or Google for windows task kill.
XP's PROCESS command also has a -k switch which allows you to kill a process by name, such as the following example:
process -k notepad.exe
Also of note, if your process is not actually hung (ie: not responding) but is chewing up CPU cycles, and you want to let it finish eventually but need to interrupt it temporarily, you can use the -s and -r switches to suspend (-s) and resume (-r) a process.
Taskill from DS Software is very small (just under 6.5 KB), free, and will take less than a minute to setup. It is similar to the built-in taskkill, but will work on systems that do not have taskkill, and will forecefully kill any program, even if it is not frozen, making it perhaps more suitable for killing Firefox. Taskill is both a process viewer and killer. It works in GUI or CLI mode and can kill multiple instances of the same task in one go.
Set it up in a location where you’ll easily know the path to it, such as at the root of the “C:\” drive, and create a new shortcut, such as this example:
"C:\taskill.exe" firefox.exe
Where the part in quotes is the location of taskill.exe, and then immediately after that you put the name of the executable program you want to close with the shortcut.
PsKill is a kill utility that not only does what the Windows NT or Win2K Resource Kit's 'kill' version does, but can also kill processes on remote systems. You don't even have to install a client on the target computer to use PsKill to terminate a remote process. PsKill supports Windows NT 4.0 and later.
Example: pskill -t firefox
For more info, see:
http://www.windowsitpro.com/Articles/ArticleID/43569/43569.html?Ad=1
Launchy fans can use the Killy plugin instead of the Task Manager. If you are not familiar with Launchy, it is a free windows utility designed to help you forget about your start menu, your desktop icons, and your file manager. Launchy indexes and launches your applications, documents, project files, folders, and bookmarks with just a few keystrokes! More info on Launchy can be found at http://www.launchy.net/.
App Killer from Shenandoah Software is a powerful, easy-to-use add-on for Windows. It allows you to selectively kill programs and processes. The App Killer log will let you know which programs terminated cleanly, which ones won't close willingly, and can force these programs to close after a user-specified waiting period. App Killer is "User Profile" aware. Ideal for creating a custom list of several programs to close at once with a single click!
Notice: Shenandoah Software is closing down... All of our software is now free to use. If you need a license for App Killer, use the following:
License Name: Valid User
License Number: 2443762-2910643
App Killer from Palmersoft, freeware that will check your system every 30 seconds for programs on your block list. If it finds any open then it will close them immediately.
I think this is a great idea, but you cannot add your own items to monitor or close. You can only select items from a pre-programmed menu, which is periodically updated, often in response to user's requests.
Credits
Most of the information above came from the following articles and my own experience: