Hi d/load and run SuperAntiSpyware and Malwarebytes.
Problems with shutdown on a Pc can be numerous>check lnks above.
There are many things to check>let us know if any of the suggestions help.
Also do some Pc maintenance.
http://computercleanup.blogspot.com/
List includes..
Scan For Viruses.
Scan for Spyware.
Microsoft updates.
-----------------------------------
Disk Cleanup.
Check Hard Drive for Errors.
Defragment Your Hard Drive.
-------------------------------------
Registry Cleanup is in their list but
Cleaning the registry may cause you more problem than you started with..
so it would be best to skip that one.