try this
http://windows.microsoft.com/en-us/windows/startup-repair-faq#1TC=windows-7can also do a chkdsk in safe mode and see if any bad blocks,
try booting with only mouse keyboard and monitor attached
make sure there are no disks in cd rom or floppy if you have one.
look at event viewer and see if it shows anything from when it first shut down.
could also make a bootable cd and try and run antivirus from there if you suspect a virus