Shrinking/Compacting the Windows Registry
Updated: Friday October 9, 2009

For those using Windows 95, 98 or ME goto the following section below.
For those using Windows NT4, 2000, XP, Server 2003 or Vista, scroll to the bottom of this page.

-[This section is for Windows 95, 98 & Millennium users only]-
There are two methods of 'shrinking' the registry.  First method is the old way.  Second is the faster one.
BOTH of these methods require you to exit Windows and enter MS-DOS Command Prompt mode.  You can
reach native DOS mode by either selecting Restart in MS-DOS Mode or by selecting Command Prompt Only
optoin in Windows 95 or 98.  To access native DOS mode in Windows ME, boot from a WinME boot disk
and select the Minimal Boot option.

[Method 1]  Go to the following site and read the instructions very carefully on how to compact the registry:
http://www.users.dircon.co.uk/~flibble/regsmall.html  (now archived at the Internet Archive Wayback Machine
web site)
Maker sure you have downloaded the modified Regedit.exe file at the above site before proceeding if
you are using any release of Windows 95 or 98.  You can obtain an even newer and modified edition of
Regedit.exe at this web site:
http://www.mdgx.com/files/REGEDITS.ZIP
This one is modified to work under Win95/98 and has the Favorites feature (from the WinME version) &
memorizes what recent registry key was edited.  You MUST be using the 'modified' version of Regedit
when you try out the registry shrinking tip with Regedit to avoid any problems.  Copy the
'bug fixed' Regedit.exe file onto the Windows folder (and onto the Win95 startup disk < this is optional).
Simply boot into DOS mode by pressing the F8 key to view the Startup menu, choose the
Command Prompt only option, go to the Windows folder [c:\windows] and type the following:

c:\windows\smartdrv

c:\windows\regedit /e all.reg

c:\windows\regedit /c all.reg

Doing this method will take some time and may take even longer if using a slow PC with limited memory.
The modified Win9x Regedit.exe file not only fixes a problem when importing a .reg file with large registry
keys & keys with carriage returns and newlines (\n \r), it also prevents information from immediately
being entered into the registry when double-clicking on a .reg file in Windows 95 by asking you whether or
not the info from the .reg file will be entered into the registry; the same feature included in the Win98 & ME
versions of Regedit.  You don't need the modified regedit.exe file if using Windows ME.  The modified
Regedit.exe file displays registry information faster than the pokey Win95 versions of Regedit.
Note: To compress the user.dat file from different users if user profiles is enabled do the following:
1. Go into DOS mode by either selecting Restart in MS-DOS mode or by pressing F8 when the computer boots
     to display the Startup menu.  Select the Command Prompt Only option.
2. Compress the user.dat & system.dat files from the Windows folder first using the method described above.
3. Now go to any ONE of the 'c:\windows\profiles\user name' folders where 'user name' is the specified user
     folder where the user.dat file is NOT compacted.
4. Type "regedit /R:c:\windows\profiles\user name\user.dat /e user.reg" to save the contents of the
    user.dat file from the 'user name' folder [NOT the Windows folder] and the contents of the system.dat
    file from the Windows folder.  The /R switch specifies the location of the user.dat file.  The /L
    switch mentioned in the next step specifies the location of the system.dat file.
5. Type "regedit /L:c:\windows\profiles\user name\system.dat /R:c:\windows\profiles\user name\user.dat /c
    user.reg"
    This re-creates the registry, saving both the user.dat & system.dat files in the 'user name' folder rather
    than the usual Windows folder because the locations of the registry files were specified (and the system.dat
    file that was already compressed & stored in the Windows folder will be left intact).
6. Delete the system.dat file from the 'user name' folder since Windows will only use the system.dat file
    from the Windows folder.  Use 'deltree /y system.dat' to do it.
7. Repeat steps 3 to 6 for other users stored in the Windows\Profiles folder.

[Method 2] Go into DOS mode and run the DOS version of Registry Checker [scanreg.exe] with the /opt
switch [scanreg /opt].  This is the fastest and most reliable way to compact the registry.  Win98 & ME users
have Scanreg, but Win95 users can download the Registry Checker tools from this site:
http://www.95isalive.com/dloads/Scanregsetup.exe
Save the scanregsetup.exe file onto a temp folder and run the file to install the Scanreg files.  Running Scanreg
with the /opt switch will only compress registry files for single user systems only in Win95 & 98 (if user profiles
are NOT enabled from the Passwords control panel applet).  If user profiles are enabled then go to the above
site and download the instructions on how to shrink the registry files for multiple users under Win95 & 98
[follow the instructions very carefully when doing the trick].  WinME users can use any method (running
Regedit with /e and then the /c switch) or (running Scanreg with the /opt switch) since both the WinME
editions of Regedit & Scanreg can compress registry files for ALL users, including user.dat files stored
in all 'c:\windows\profiles\user name' folders.

-[This section is for Windows NT4 users only; NOT for Windows 2000, XP or higher systems]-
The NT-based versions of Windows use completely different registry files than the ones featured in the
9xME-based versions of Windows.  Follow the steps VERY carefully at this following web page on how
to compact the registry under Windows NT4:
http://www.windowsitpro.com/Articles/ArticleID/14751/14751.html

-(And for those using Windows 2000, XP, 2003 or 95, 98 or NT4 without needing any of the tips above)-
The easiest way to compress the registry files is to use a no-nag shareware utility called RegCompact.
RegCompact version 1.0 is a discontinued version but effective in compacting the registry files.
RegCompact 1.0 can be found at this site:
http://ftp.pcworld.com/pub/new/utilities/system_resources_tune_up/regcmp1a.zip
This tool is not supported under Windows ME because RegCompact cannot detect & compress the
classes.dat file.  Run Scanreg.exe on the WinME boot disk with the /opt switch to 'optimize' the registry
files (including the classes.dat file) instead.  RegCompact 1.0 is the only version that works under Win95/98.
Note to WinXP users: RegCompact will NOT run under a 'Guest' account and under a 'Limited' account.
You must have 'administrative' rights (or a administrator account) in order to run RegCompact under
WinNT4, Win2000, XP, Server 2003 & higher.

The latest version of RegCompact [now called RegCompact Pro] can be found here:
http://www.experimentalscene.com/downloads/RegCompact-Pro-2.6.7.exe
This last version of RegCompact Pro is now freeware [yay!] but does NOT require .NET Framework.
You need to be using at least WinNT4 to use RegCompact Pro and this latest release of RegCompact Pro
is fully compatible with Windows Vista and Windows 7.
 

[Click here to go back to my Computer Tips for Windows page - part 1]