This can happen sporadically or when you log off one user account and log in again with another account (or the same), then try to log off or shut down for the second time. The machine does not respond to the log off or shut down commands.

I first started to kill all running process using Task Manager and trying to log off after ending each. It finally logged off. I figured it was a program preventing the shut down/log off.

I made the following Registry edits and problem was solved. Please exercise caution when editing the registry.

HKEY_CURRENT_USER\Control Panel\Desktop\

AutoEndTasks = Set this value to 1

HungAppTimeout = Set the value to 1000 (One Second)

WaitToKillAppTimeout = Set the value to 1000 (One Second)

Happy editing!