How to reduce the size of the Windows Registry - gHacks Tech News

How to reduce the size of the Windows Registry

The Windows registry is growing in size regularly. Whenever you install new software, make system changes, install system updates or service packs, it grows in size.

The main issue here is that the size is not reduced again if you uninstall software, which can become quite problematic after a while.

While this is not a problem for most users it could become for users who make lots of changes to their system. A huge registry is slowing down the startup of the system, which is actually the number one reason why a user should check the Registry from time to time and compress it so that its system load time gets reduced again.

Windows already has a tool in place that can compress the registry again and restore the compressed registry. Restoring the Registry can only be done before Windows is loaded which means that this has to be done using a boot disk of some sort or another way to boot into DOS.

Before you go all crazy you could check to see if it makes sense to compress the registry and restore it. To do that you need to use the following commands using the command line in Windows: (press return after each line)

pushd %windir%\system32\config
reg save HKLM\Software software.hiv
reg save HKLM\System system.hiv
dir software
dir software.hiv
dir system
dir system.hiv

Compare the sizes of software and software.hiv & system and system.hiv. It probably makes sense to restore the files if the difference is larger than one Megabyte for software and larger than 400 Kilobyte for system. Please note that you need to perform the commands in DOS.

reg restore HKLM\Software software.hiv
reg restore HKLM\System system.hiv

Update: Please note that you can also use a program such as NTREGOPT to compress the Registry in Windows automatically. This is definitely an elegant solution as you do not have to run the commands on a command line or before Windows starts.

If you are running Windows Vista or newer, you should read the information posted by the author on the website. According to the information there, the program will only work properly if you disable the User Account Control prior to running it.

While that is a setback, I would suggest you follow the recommendation and turn the control back on after you have run the program and rebooted your computer system in the end.

Summary
Article Name
How to reduce the size of the Windows Registry
Description
How to check the size of the Windows Registry, and compress it in DOS or using software from within Windows to free up disk space and improve boot times.
Author

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. Jose said on October 19, 2007 at 3:51 am
    Reply

    I tried your hint – but I got the following error:

    reg restore HKLM\Software software.hiv
    Error: Access is denied.

  2. Tehmul Ghyara said on October 19, 2007 at 4:16 am
    Reply

    I prefer using ntregopt (part of erunt). URL: http://www.larshederer.homepage.t-online.de/erunt/

  3. Martin said on October 19, 2007 at 8:57 am
    Reply

    Jose did you use that command in DOS or in Windows ?

  4. Jose said on October 19, 2007 at 11:38 am
    Reply

    In DOS.

  5. Martin said on October 19, 2007 at 12:23 pm
    Reply

    That’s strange. Jose I suggest you try the software recommended by Tehmul https://www.ghacks.net/2007/10/19/automatic-compression-of-the-registry/

    this should work no matter what.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.