A. The following procedure can be used to compact the registry files, but also to restore the 'repair disk data' when you messed up the registry:

1) As always, make sure you have a backup of you're system, including the registry

2) Run Start: "RDISK /S-". This automatically updates the repair info located under %systemroot%\repair. The registry data are reorganized and compressed.

3) Next step is to expand these files to a temporary location.

EXPAND %systemroot%\REPAIR\SAM._ %temp%\SAM
EXPAND %systemroot%\REPAIR\SYSTEM._ %temp%\SYSTEM

4) Check your %temp% folder and %systemroot%\system32\config to find the difference in size between the different files that make up the registry. Probably the SOFTWARE hive will have a remarkable difference. In my case it shrinked from over 10Mb to 3.5Mb.

5) The registry files in %systemroot%\system32\config should be replaced by the reorganized ones in your %temp% folder. You can do this by:

  • Booting to DOS or Win3.x/95/98 and simply replace the files (in case your system files are on a FAT partition).
  • Replacing these files while booting from a second Windows NT installation.
  • Or by using the MV command (move) from the Resource Kit to move these files at boot-time:
    MV /X /D %temp%\DEFAULT %systemroot%\SYSTEM32\CONFIG\DEFAULT
    MV /X /D %temp%\SAM %systemroot%\SYSTEM32\CONFIG\SAM
    MV /X /D %temp%\SECURITY %systemroot%\SYSTEM32\CONFIG\SECURITY
    MV /X /D %temp%\SOFTWARE %systemroot%\SYSTEM32\CONFIG\SOFTWARE
    MV /X /D %temp%\SYSTEM %systemroot%\SYSTEM32\CONFIG\SYSTEM

When I performed these steps I notices a serious performance gain during system startup.