By deleting the this registry-key, Win9x will forget all information about hardware and at next boot it will start redecting everything :
Note if Windows doesn't start detecting new devices after first boot, then go to Control Panel -> Add/Remove Hardware and force a scan for new hardware.
Note doing this will cause Windows to forget your network settings, and you might manually have to reinstall your Dial-Up Adapter. But it will remember the dial-up connection to your ISP along with userid and password.
Note before doing starting the detecting it is a good idea to have all necessary driver disks ready along with the Windows CD-ROM in case it cannot reuse the drivers which currently resides in the Windows directory.
Note it might be a good idea to Check for ghost devices after redetecting and installing all devices.
Note one can use this solution to migrate Win9x from an old computer to a new computer. Before moving the HDD into the new computer just delete the registry folder shown above. Though this solution doesn't come near the perfection of a clean format and install, but it is quicker and keeps the settings and applications.