This is a bug.........sorry, 'feature' of Windows 98 and there is a patch for it:
MS Support Page
Basically, I would follow the link about downloading the Shutdown Supplement. If that fails to work, I suggest you look in your anti-virus settings and uncheck the option about scanning floppies before shutdown. If for example you have a laptop with detachable floppy drive, this could be the source of your problems.