I came across the following tip on WXP News; and it works, (at least for me)!.
When shutting down do you find that a programme hangs and stops responding, and you open up the Task Manager and click End Programme (sometimes several times before the uncooperative program finally shuts down).
Why not just have Windows close programs that quit responding so you won't have to? You can do it with a registry tweak. As usual, we recommend that you back up the registry before making any changes. Here are the steps:
Run regedit, navigate to the following key: 1. HKEY_CURRENT_USER\Control Panel\Desktop
2. in the right pane, right click the entry AutoEndTasks.
3. Select Modify.
4. In the Value Data field, change the value to 1.
5. Click OK, and close the registry editor.
If you want to change Windows back to the default behaviour (not closing unresponsive programs, just repeat the process and change the value back to 0). You'll need to restart the system for the change to take effect.