The curious part here, I think at least, is that it only freaks out in real-windows, and not in safemode. Cause if it's a switch issue, it should still shut off in safemode.
My guess is either a rogue driver or something on startup (virus, rogue app, etc) is shutting the system down. And that...