Taken from the MS website:
"The User Profile Hive Cleanup service helps to ensure user sessions are completely terminated when a user logs off. System processes and applications occasionally maintain connections to registry keys in the user profile after a user logs off. In those cases the user session is prevented from completely ending."
To coorect slow shutdown:
It will take about 8-10 seconds for Windows to close after the fix:
1- Start/Run and type Regedit
2- Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CURRENT CONTROL SET/CONTROL
3- Click on “Control”
4- Select “Wait to kill service timeout”
5- Right click and select “Modify”
6- Set to a lower value than 2000
7- A setting of 200 will be sufficient
Normal setting is 2000 but can safely be reduced to 200 for a quick shutdown. Sometimes in PCs, including my own, an extra nought is added on to make it 20000. Not sure why this happens but when it does it leads to a very long shutdown time.