Computer shutting off suddenly

I have been having this problem for a while. I have McAfee but I haven't been able to do a full scan since July. Every time the scan begins after a short period the computer shuts down. This also happens when I've tried playing a game on line or it will just happen randomly. When it shuts down the power button stays green and I need to keep it pressed in until it shuts off. I press the power button back on and it starts up. Each time I start it again, before I get to the login screen for windows, I get a screen which is blue and says to do a system check is highly recommended but I can cancel it within 9 seconds. Any suggestions?

The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Compnet Ventures, LLC hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.