Tutorial Thursday

Over in the CyberNet forum, Pieter posted an awesome tip for Linux users where you can actually create a shortcut to forcefully terminate an application. This is handy in situations where a program, such as Firefox, freezes up and won’t shutdown. I figured there had to be a way to do this in Windows as well, and so I started searching around.

Almost every site that I found recommended using the taskkill (instructions) command line option, which is rather easy to create a shortcut for since it is built-in to Windows. Doing taskkill /f /im firefox.exe would be the command needed to “forcefully” close Firefox at a moments notice, but I found one flaw with it. Sometimes it is handy being able to forcefully close Firefox even when it’s not frozen, because then you know the next time you start the browser it will ask whether you want to restore your tabs and windows.

What I found with taskkill was that if a program wasn’t frozen it would gracefully close it. That might be nice in some cases, but when you use this with Firefox you won’t get the option to restore your session the next time you start the browser. Don’t worry, I wasn’t about to give up! With the help of a very small (just  6.5KB) free program it will take under a minute to setup.

Note: These instructions are written for Vista, but should be similar in all versions of Windows.

  1. You can download Taskill (note that it is only spelled with one “k”) from the developer’s homepage, but you’ll have to scroll down a ways to find it. Alternatively we are mirroring the file on our server to make it easier to download. Place the file in a location where you’ll easily know the path to it, such as at the root of the “C:\” drive.
  2. The program does have an GUI, but we aren’t going to be using it. Remember, our goal is to create a shortcut that takes advantage of it. Right-click on the Desktop and choose New -> Shortcut.
  3. When it asks for the location you need to type the path to Taskill, followed by the executable’s name that you want to forcefully close. It will look something like this:

    "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. Then click the Next button.

    (Click to Enlarge)
    Taskill Create Shortcut

  4. Name the shortcut whatever you would like. In this case we’re going to call it Kill Firefox.

    (Click to Enlarge)
    Taskill Name Shortcut

  5. Now you should have a pretty new icon that you can use to kill all instances of Firefox. You can put this on your desktop, in the Quick Launch bar, or even in the Start Menu.
    Taskill Firefox Shortcut
  6. Extra Credit: You can change the icon of the shortcut by right-clicking on it, selecting Properties, and then click the Change Icon button. While you’re in the Properties you should consider adding a keyboard shortcut if you plan on using it a lot!

This will probably only appeal to a small amount of people, but given the tiny application size and the fast execution I thought Taskill was pretty darn awesome. I use this with my Firefox so that I can shut it down at a moments notice!