You have an HP M8000N media center PC, and your computer started shutting down for no reason about 3 months ago. Now it shuts down even before it can boot up. You have reformated a hard drive, replaced a power supply, and have pulled out extra ram.
You have tried an operating system restore as well and your computer still stuts down unexpectedly. Do you have any suggestions as to what a problem might be? You can check to make sure all your fans are spinning ie. power supply, case, CPU fans.
If even one fan is failing it can cause your computer to overheat and shut off. If all fans continue to spin while in BIOS or trying to boot Windows, try blowing out any dust. Also, too much dust in and around your fans can cause it to overheat and shut off.
Does your computer stay powered on for quite awhile when just in your BIOS? Also, try booting it into Windows safe mode, last known good configuration, and safe mode with networking support. I would remove as many devices as possible ie. CD, DVD, USB, SD cards, etc. as possible to test.
It's possible a hardware device is causing your problem. You may need to reinstall hardware devices one at a time until you find a culprit. New hardware added to your computer might be causing your issue.
Updating your BIOS might help. If you have Windows Vista or Vista 64 bit there are BIOS and firmware updates. A software and driver downloads page has them.