A full factory restore? Put it as it was from the factory to see if it's a hardware issue.
My HP Pavillion g6-2010nr laptop shuts down when I startup. As it reaches the Windows loading screen, it just shuts down. Then when I press the power button, it won't turn on.
HOWEVER, when I close the lid and then open it, it turns on. And then it shut down again.
Now here's the weirdest part: when I connect it to an external monitor, then turn it on and then quickly close the lid, it goes on normally and I can use it without problem; just need an external keyboard and mouse. And when I open the lid, it shuts down just like that.
In short, I can't use it with the lid open, it basically has become a desktop computer. What is going on?