I used to have that problem when I used Win 98, It would sit there in Either the "Windows is shutting down screen" or in DOS mode with the blinking cursor, I downloaded the patches and It came right after that. It is a common defect in Windows 98. After I had gone into 98SE it would only hang in the Cursor screen, but if you download that very same patch that you can find on Microsoft's website, that'll still work.
It also did the same thing with ME for me too. I just DL'd the patch and it still worked fine afterwards.
If the problem persists and gets overly annoying, I backed up the data on one of my PCs (now this was in like 1999.) and did a clean OS reinstall, it didn't do that anymore after wards.