hi,
check is there any scheduled tasks, if there is any tasks pls remove scheduled tasks for system automatic shutdown. and do command line > chkdsk. more than that problem is still repeating exchange hdd if it is in warranty,if it is not in warranty, i suggest to please visit desktoprepair