Try booting into Safe Mode and see if it shuts down properly there. If it does, something non-os related is starting /w the OS (Instant Messenger, Anti-virus, CD burning utility, etc. that's malfunctioning, or conflicting with something else.
The cardinal rule in PC repair is to strip it down to the essentials, and re-introduce things incrementally until the issue recurs, so...
If it works fine in Safe Mode, go to Start > Run > MSCONFIG, click on the Startup tab, hit 'disable all', re-boot and test things. If that works, re-introduce them back one at a time until the issue comes back.
(N.B. you mage get some cryptic errors if non Microsoft-related items in the Services tab have items disabled in the Startup tab.
Here's a great reference so you can figure out what those Startup entries are: http://www.lafn.org/...up/PENINDEX.HTM
Also, if you haven't already, try logging out of and manually exiting anything you can then trying to log off/re-boot. (like Instant Messenger clients.. many of them that populate in the System tray can allow you to shut them down by right-clicking on them).
Edited by rocaddict, 19 July 2008 - 12:52 PM.