So last night I was playing a game on my Acer Aspire 5735z laptop when it suddenly shut down. I put this down to overheating as the fans at this stage were running very fast. I waited an hour then talk apart my laptop to clean the fan. After reconnecting everything I powered up the laptop only for it to turn off with a distinct "click" sound less than 20 seconds later. I tried this again with and without the battery as well as by holding down the power button for 30 seconds but still this problem persists. I've taken apart my laptop to see if there were any loose components or screws and even removed my RAM gave it a clean and replaced it with no improvement. I am able to enter the setup menu by pressing F2 at startup and the laptop seems to stay on no matter how long I'm there for. However as soon as I exit it will resume the same process and "click" shutdown.
Try to remove the HDD of your laptop, boot it up and see if it will stay on a black screen with an error message that's something about missing boot device. If it does stay on, turn it off put the HDD back in and see if the same problem will persist because if it does still shut down you may need to replace the HDD already. Also retrace the steps you did when you cleaned out the fans just to make sure that everything is seated properly and connected nice and snug.