I had an old computer with similar problem. I don't think its problem was overheating because even if you shut it down normally, it would turn on itself several hours later!
I don't think the problem was virus either because I had the os reinstalled with new hard drive and did not connect it to internet at all. Still the computer would be on and off itself frequently.
I think my computer's problem was power supply but I am not sure.
I don't think the problem was virus either because I had the os reinstalled with new hard drive and did not connect it to internet at all. Still the computer would be on and off itself frequently.
I think my computer's problem was power supply but I am not sure.