You should shutdown the computer gracefully to avoid corrupting the files on the hard drive ...
When I use the shut down command from the start button the computer does not power off (it hangs)!
Yes, this happens from time to time time.
But why does this happen? A program or service is not shutting down gracefully for some reason that you will have to
troubleshoot to find.
Your first step would be to check your Event Viewer in the Computer Management console.
You are looking for any errors where the error is when a service either fails to
shutdown or hangs on the start up.
Note: Not all programs or services will write an error in the Event
logs, check the folder that Dr. Watson writes logs in.
If you have a service that is causing an error then try disabling the service and do a restart, if the computer
does the shutdown normally with out hanging then you have found the culprit.
If you don't have any errors on startup or shutdown then you need to do some more troubleshooting.
You next step is to open the Task Manager then open the "Processes" tab and look at the services (at the bottom of the window is a check box "Show processes from all users" check the box if it isn't checked).
You can sort the list by "Image Name" or "Mem Usage" I use Image Name because I know what 99% of the services do,
if you don't know then don't turn it off!
You may want to sort by Mem Usage high to low or low to high it is your choice. When you sort by CPU this is amount of time each service will be allotted by the service manager, some services have a higher priority (do not change the priority of a service or you will be hitting the reset button or the power button to get control of the computer again).
When the computer shuts down the Task Manager is the last thing to close, if a service has hung you may be able to identify it in the Processes tab.
Note: Sometimes having the Task Manager open makes an errant service or program behave, this is a step you can use to try to identify the offending program or service.
If the Task Manager doesn't help with discovering the shutdown problem then
more troubleshooting is needed.
Before turning off any services in the Computer Management -> Services and Applications -> Services look in the startup folder for both the All Users and your User ID for XP and Users for Vista/Windows 7.
Note: Vista and Windows 7 Users may be locked, if that is the case you may have to "Take Ownership" of the folder to see what is in other User startup folders. Do not take this step lightly you can cause serious security problems messing with the Ownership of some folders.
Another place to look is in the Run keys for the Current User and System in the registry, if you know what should start on startup look for anything that is different, anything that an uninstalled program left or maybe something put there by a virus (never know...).
Your last step if you haven't found the problem is to try turning off services - one at a time!
Turning off services is a drastic step, that means you have to be very careful with a service you do not know what it does.
The 5 Steps to high quality and cheap
DIY Computer Repairs
Get It Today...
You could do a properties on the service then in the "Display name" block copy the text and do a search in the registry for what the service does, this isn't always a sure thing the name may not be what the registry key says it is, the another search term would be in the "Path to executable", then with the service "svchost" this also doesn't tell you any thing. Best bet is if it says "svchost.exe" leave it alone.
If you sort by "Startup Type" and bring the "Automatic" to the top all these services were installed either by the Operating System installation or a program installation. Such as AVG WatchDog, this is a service that the AVG install program sets for automatic start and you can not turn it off, this service keeps the AVG program running even if a virus try's to shut it down. (A pain when playing some games...).
Go through your services looking for anything that is strange, such as a service set for "Automatic" but in the "Status" column is not "Started", has "Starting...", or something out of the ordinary such as the "Description" column blank (some viruses use a service to keep a anti virus program from finding them ... doesn't work but they try and a sure give away is the description block being empty.
If you want a list of services that need to be running you can do a search
for 'running services for [your Operating System] on the web or look in the
Appendix of the
Self Computer Repair Unleashed! 2nd Edition Manual.