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.
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.
In DOS.
Jose did you use that command in DOS or in Windows ?
I prefer using ntregopt (part of erunt). URL: http://www.larshederer.homepage.t-online.de/erunt/
I tried your hint – but I got the following error:
reg restore HKLM\Software software.hiv
Error: Access is denied.