From: Tom on 10/05/2004
70% of blue screen errors are caused by bad drivers.
Since this only happens when you are shutting down, I would suggest that you try pressing ctrl+alt+delete, and one by one, ending each task. You will need to leave explorer.exe, and probably taskmanager.exe (since that is the window you are in). If, after shutting down all of those programs, nothing happens, then you can fairly safely assume that the problem is probably a driver. There is a small probability that it may be a system file, root, or service, in which case this will take more detail to solve.
If the problem appears to be a bad driver, go to the control panel, click on the system, and look at the devices. If any of them have a yellow question mark in front of them, they are definately not working. If they do not have a question mark, then they might not be working, only windows has not figured it out yet. Give it a try, and a post back.