Intermittant problems are difficult to resolve... but here's a great site for stepping through most (if not all) of the issues with Windows' shutdown problems:
Mostly it has to do with the quantity of resources being used when you do the shutdown. If you right-click on My Computer --> normal-click on Properties --> Performance tab, you will see the amount of free system resources. If it's less than 80%, windows will probably not shutdown properly at that point it time. If you close out some of the active programs, then the "free" system resouses "should" increase (but does not always -- you may have a memory leak in some of the not well written programs).
But step through the above procedures for troubleshooting this, and you should get better results from Windows.
4756us8.exe is supposed to be a fix for Windows 98 shut down problems, but I have not tested it myself. If you do test it and it helps, let me know. I got this from www.bootdisk.com, which is a great site for such things.
Every time I've had a serious shutdown problem with 98 it has been a video driver issue.
Make sure that your video card bios, chipset drivers, and video driver are the latest versions for Windows 98.
Also, use Windows Update and install all critical and security updates.
Finally, use a registry cleaner to clear up loose ends in the registry that can get in the way. RegClean from Microsoft is free, but limited in function. Win Doctor from Norton, or the Fit-It utilities from Mijenix do a decent job of cleaning up registry errors.
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Windows 98 Shutdown Issue