The trick demonstrated in this Workshop applies only to Windows Vista and Windows 7, so XP users should not attempt it. Also, be warned that the shortcut will do its job instantly, so any unsaved work sitting in running applications will be lost. Click Start, type cmd into the search box and press Enter. This opens the command prompt. We'll test the command to see if it works properly before creating the shortcut. The command is called taskkill. To find all its options, type taskkill /? and press Enter. This shows the full syntax of the command, plus each of its options. It looks complicated, but only a couple of these options are actually needed to get the command working.
The useful parameters include /F, which forces applications to close. This is useful for closing stubborn program windows, but you will lose unsaved work. Without it, some windows might not close. With it, unsaved work will be lost. The other option is /FI: this enables the use of a filter to specify which programs to close. To close every program running in the current user account, for example, you would type taskkill /F /FI "USERNAME eq yourusername", replacing yourusername with the relevant username.
It is important to understand that, if issued, this command will shut down everything. This includes Windows Explorer and other operating system tools, removing the Start menu and Taskbar - not necessarily a good idea. However, if this should happen, press Ctrl and Shift and Esc to open the Task Manager, click New Task, type explorer.exe and press Enter. Do the same for dwm.exe. So, for a less-destructive program-closing shortcut, we need to add a filter to the command to exclude explorer.exe and dwm.exe. It would look like this: taskkill /F /FI "USERNAME eq yourusername" /FI "IMAGENAME ne explorer.exe" /FI "IMAGENAME ne dwm.exe"
Type this command into the window opened in Step 1 and press Enter. If other unwanted programs close, restart the PC, find the application's process name and add it to the command's filter using the form: /FI "IMAGENAME ne processname.exe", where processname is the name of the process (like winword.exe, for Microsoft Word). Test the command once more. If all works well, convert it to a shortcut. Right-click anywhere on the Windows desktop and choose New, followed by Shortcut. Type the full command as the location for the shortcut.
Click Next and type a fittingly descriptive name for the shortcut: it might be worth including a reminder of the shortcut's ruthlessness - ‘Close everything without saving', for example. Click Finish. Test the shortcut to ensure it closes all open windows properly. If it works, you might want to give the shortcut a recognisable icon. Right-click it and choose Properties. The full command should be displayed in the Target field.
Click the Shortcut tab, followed by the Change Icon button. A pop-up message warns that C:\Windows\System32\taskkill.exe contains no icons. Click OK. Select an icon from the displayed list - something like a cross, perhaps. Alternatively, click Browse and browse to a specific icon file. Click OK twice to confirm. In Windows 7, drag the shortcut to the Taskbar to pin it there so it's visible even when there are lots of windows open. In Vista, just leave it on the desktop.