1) Try running a chkdsk /r by doing it this way:
chkdsk C: /r (if C:\ were your drive--we realize it could be another letter
depending on how you set things up, dual boot, etc.
A dialogue will spring up on your cmd prompt and ask if you want to run the
chkdsk at next boot Y/N>you type Y>if the problem is emergent, for example
you're trying to fix random restarts with chkdsk which is often an effective
remedy, than close all programs and windows so you have a clean shutdown,
and restart. Chkdsk will run on boot.
2) Go to run>devmbmt.msc>USB Controllers>Rt. Click All Root Hub
Entries>Power Mgmt tab(far right)> Unck. that box for all Root Hub entries
(Repeat each entry).
3) Follow the steps in this article (granted keyed to XP but should apply in
Vista as well--it's used for shutdown hangs but also helps in random
restarts.
Troubleshooting Windows Shutdown Problems
http://www.windowsnetworking.com/articles_tutorials/Troubleshooting-Windows-Shutdown.html
Good luck,
CH