Have you looked in the event log for red or yellow flagged items corresponding with the time(s) you shutdown?
start menu/run, type eventvwr.msc
Shorten the time tasks are allowed to `hang`..
Application - Modify Application Timeout
The operating system has a set amount of time that a program must be frozen for before it is timed out. Often this number is set too high. But in some circumstances it is set too low. Depending on if the program is doing a lot of calculations in the background the computer may think that it is timed out. To prevent this increase the value of the timeout in the registry.
Navigate to HKEY_CURRENT_USER\Control Panel\Desktop. Select HungAppTimeout from the list on the right.
Right on it and select Modify. Change the value to the new timeout value. Reboot your computer.
Back up registry key(s) before changing anything.
(Taken from click here)