|I have an Acer aspire that did something like this. It turned out the battery was dead and the connector which the power cord plugs into was bad on the laptop.|
I would get the computer started, but it would only run for a little while then shut off unexpectedly. The power light on the laptop would be orange until I put a little stress on the connector one way or the other. And the battery charge indicator at the startup screen (windows 8) would change between the charging (powered battery icon) and battery icons. If I unplugged the brick from the wall, it would immediately shut off. So, the battery was only good enough to just keep it running with the laptop plugged in. But if I moved or bumped the machine at all, the connection would break and the machine would shut off.
It seems what happened over time, the weak power connector inside the laptop had only been making intermittent connection. So, the battery wasn't getting a good charge on it ever. And running down quite often until eventually being drained and unable to recharge at all.
I got a new battery for $60 somewhere online, I can't remember.
I Still haven't fixed the connector itself.