|I think what the OP is trying to say is that his computer is shutting down as if power to his home was cut off, but the home power is actually still flowing, it's just the computer that seems to be having the issue.|
I recently upgraded to Windows 7 and have noticed that my computer will randomly shut down after 30 minutes or so. I can't say that I recall this problem occurring so frequently (seeing how I only upgraded a few days ago...). However I've narrowed it down to either a Heating issue with my hardware, or perhaps a bad file/code somewhere within the System Core files and/or registry. Until I can fully understand where this issue is coming from that's all I can offer to you now.
If you recently installed any new hardware try reverting back to your previous settings. Check to see if your computer is in a Heat-Free location. And lastly, make sure your foot isn't catching the power cord by accident, sounds goofy but you'd be surprised how even the slightest force can cause a loose power cord to shutdown the whole system in a matter of seconds!