When a Windows installation have been running for a long time and hardware, software have been changed alot, then the registry can become bloated. One can use REGEDIT in DOS to compress/shrink the registry.
Exit to DOS and write the following command to extract both system.dat and user.dat to the file all.reg:
When it is finished write the following command to restore both system.dat and user.dat from the file all.reg:
regedit /e all.reg
Note one can speed up the process by loading SMARTDRV before hand.
regedit /c all.reg
Note it can be a good idea to make a backup of the system.dat and user.dat before starting this process.
Note this can also be used to change the registry in DOS by editing the All.reg with Edit.exe.
Note if using Win98/Me one can just use SCANREG.
More Info MS KB131352
More Info MS KB131431