By forever, up to 20 minutes, sometimes won't shut down at all have to
switch off power at mains.
Could be some application didn't clear its link to the Registry,
Windows waits for it to do so, of course it rarely does, so it won't
shut down since it thinks some application or process is still
running. If you waited long enough in XP you sometimes got a window
confirming something was running and that Windows was waiting on it.
One thing you can try if this keeps happening. Assuming you already
shut down all your applications manually before your shut down
Windows. If not, you're suppose to do that, not have Windows shut them
down. Now just before you actually try to shut down, go to Task
Manager (Ctrl-Atl-Del) and see if anything is running in the processes
tab other than system stuff. If so, that's likely the application
causing Windows to hang.
Not surprising to me or anybody not blinded by Microsoft loyalty under
XP I would sometimes try to play a vid in Media Player. It would
refuse, showing the ususal can't find CODEC message. I usually would
just ignore it, shut Media Player down and play the file on something
else. What happened was Media Player held a link to the Registry open,
so when I tired to shut down Windows some process that controlled it,
forget the name would still be running. Because of it was Windows
wouldn't shut down.
It got frustrating, since the last thing I do when I'm ready to call
it quits for a evening is shut down Windows, then the monitor. Then I
wait to hear the drive spin down before leaving the room and sometimes
don't hear it, knowing the drive is still running, because I can hear
it, so I flip the monitor back on and see (several minutes passed)
that what I just mentioned earlier was now noticed by Windows and I
had to try to shut it down manually, then finally Windows would
shutdown.