Microsoft KB Archive/247920

From BetaArchive Wiki

How to Compress or Restore a Registry Hive

ID: Q247920



The information in this article applies to:


  • Microsoft Windows NT Workstation version 4.0
  • Microsoft Windows NT Server version 4.0
  • Microsoft Windows NT Server, Enterprise Edition version 4.0





SUMMARY

Problems may result when the registry hives on a Windows NT-based computer grow too large. In the case of the system hive, growth past 16 megabytes (MB) may prevent your computer from starting. Registry hives grow when keys are added. When keys are deleted the resulting "white space" is not reclaimed, therefore the registry continues to grow over time but does not shrink. This document describes how to use the Rdisk.exe utility to compress a registry hive and how to restore it by using the Mv.exe utility.



MORE INFORMATION

To compress or restore a registry hive:

  1. Run the registry key cleanup utility to remove all unwanted registry entries. For additional information about the RegClean.exe tool, click the article number below to view the article in the Microsoft Knowledge Base:

    Q147769 INFO: RegClean 4.1a Description and General Issues

  2. Run the Rdisk utility, rdisk /s-. This creates compressed copies of all the registry hives in the %systemroot%\repair folder. For additional information about the /s and /s- parameters, click the article number below to view the article in the Microsoft Knowledge Base:

    Q122857 RDISK /S and RDISK /S- Options in Windows NT

  3. Expand the system._ hive file in the %systemroot%\repair folder. This is your new compressed hive, expand system._ system.
  4. WARNING: The Mv.exe utility is an unsupported device included in the Windows NT Resource Kit. Run the Mv.exe utility to move the old system hive to another location and then move the new system hive to the %systemroot%\system32\config folder. For additional information about the Mv.exe utility, click the article number below to view the article in the Microsoft Knowledge Base:

    Q184408 How to Replace In-Use Windows NT System Files

    mv.exe %systemroot%\system32\config\system c:\temp\system

    mv.exe %systemroot%\repair\system %systemroot%\system32\config\system

    NOTE: An alternate method, if you do not have the Mv.exe utility, is to use the method in the following article in the Microsoft Knowledge Base:

    Q181345 How to Replace Files In Use at Windows NT Restart

  5. Restart your computer. After this, you should have a computer with compacted/compressed registry hive or hives which contain no "white space."

NOTE: The preceding procedures should be added to your maintenance routines so as to prevent registry hives from becoming too large and causing problems. For additional information about compressing the SAM database, click the article number below to view the article in the Microsoft Knowledge Base:

Q140380 User Account Database Fails to Shrink After Deleting Accounts

Additional query words:

Keywords : kbenv kbtool
Version : winnt:4.0
Platform : winnt
Issue type : kbhowto
Technology :


Last Reviewed: February 15, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.