My guess is that there is a program that is running in the background that is not shutting down properly. Press ctr+alt+del and kill everything but the "explorer" and "systray." Then, shut down and see if the same thing happens. If it does not then one of these "squatters" is causing the error. If this is the case, you can try to kill each one...one at a time and shut down to find the one causing the problem. If you find it, uninstall and reinstall the program if you need it.
Alex
Let me know if this helps.
Alex.Salazar@tdh.state.tx.us