Keeping Your Registry Clean


Getting Rid Of Registry Garbage "My Favorite Method"
Method 2
Method 3

Getting Rid Of Registry Garbage

After a major clean up, you notice that the size of registry remains the same. It's just like how DOS deletes files on the hard disk.
The files are not really deleted, they are just floating. In the registry a removed key becomes an invisible existence to the reg editors.
You can export keys that are recognizable by the editors to a temp file, then use the same temp file to reconstruct a new registry.
And this is how we remove those invisible footprints.
Clean the bedevil out of your registry.
But 1st; BACKUP YOUR REGISTRY. NOTE: This works on most systems. In my personal experience, and others that I know of it
works 75% of the time. If your computer locks up during the process, or does not show 100% done from "Real Mode Dos", yet
stops: Simply reboot and Import MyReg.reg.
Example: C:\Windows>Regedit Myreg.reg Or, C:\WRP>RESTORE.
WRPV3.ZIP is the Best and easiest Registry Backup/Restore I've Seen.Install and backup. This  is a well written batch file driven
backup and restore, so it writes nothing to your system.
Far better than Microsofts URU. Download HERE

Step1: Copy all Windows .dat files To a Temp directory.
System.dat and User.dat FOR SURE.
Step2: Be sure to have a reg backup already.
Step3: Open reg editor and export "all entries" to a reg file(MyReg.reg).
Step4: Power off for 10 seconds then Boot to REAL DOS MODE.
Go to Windows directory.
Step5: Type ATTRIB -H -S -R SYSTEM.DAT and
ATTRIB -H -S -R USER.DAT.
Step6: Delete .dat files, e.g. del *.dat /y
Step7: At C:\Windows>type "regedit /c MyReg.reg", No Quotes.
EXAMPLE: C:\Windows>REGEDIT /c MyReg.reg [enter]
NOTE. If your computer locks up before the import is 100% done,
Simply re-boot and Import from C:\Windows>Regedit Myreg.reg; OR
CD to WRP and type restore.
Everybodys 95 is different, that's why the warning. Works great for me, and many others. Still, check you system out, keyboard,
applications, modem; everything! FELL SAFE! You have three backups:
1. MrReg.reg
2. WRP Backup
3. You System.dat and User.dat that you saved in step 1.
In one case this method shrunk system.dat from 5.5 to 2.4 MB.
You can only imagine how windows responded to that.. They fly:)
NOTE: IF YOU HAVE MULTIPLE USER PROFILES.
Only thing I have to WARN people of is if they use multiple user profiles when regedit rebuilds new registry it sets default user.dat
in windows directory belonging to the user which had made MyReg.reg backup.
So it is necessary to copy the original default; C:\WINDOWS\USER.DAT back to the windows directory.
After the process, please exam your system thoroughly and put it through it paces. Also keep the backup for a while before updating
it.


Method 2

FIRST; BACKUP YOUR REGISTRY.
NOTE: This works on most systems. In my personal experience, and others that I know of it works 90% of the time. If your computer locks up during the process, or does not show 100% done from "Real Mode Dos", yet stops: C:\WRP>RESTORE. WRPV3.ZIP is the Best and easiest Registry Backup/Restore I've Seen. Download HEAR
Install and backup. This is a well written batch file driven bakup and restore, so it writes nothing to your system. Far better than Microsofts URU.

Registry keeps deleted data too. It acts simmilar like MSDOS undelete. The data remains in registry but it is not visible to you. So we use regedit to export only visible data and than rebuild registry from that data. (it helps us get rid of unwanted data). Here's the procedure:

1. Make backup copies of system.dat (and system.da0) and user.dat (user.da0). Be carefull, if you use multiple user profiles than your user.dat is located in \WINDOWS\Profiles\user_name\USER.DAT, system dat is always in \windows.
If you have multiple user profiles than backup both \windows user.dat (user.da0) and \windows\profiles\user_name\user.dat user.da0)

2. Do you have MS regclean? If not than download it from Microsoft. This is very important!! Regclean cleans registry from all the trash, dead links etc. so regedit can export it normally. I was not able to export registry untill I cleaned it with regclean! Run regclean
and have it clean all the errors it can find. If you want to undo the actions regclean did in registry just doubleclick on result file regclean makes (looks like: COMPUTER_NAME XX XX XX (date).reg) That will import all the changes back to the registry.

3. Restart computer. When starting (when displays "starting Windows95" message) press F8 and select "safe mode command prompt only" (should be the last item in the list)

4. Go to \windows and enter: (I'll take for example that you have windows installed in C drive in directory Windows) In case you don't have multiple user profiles:

regedit /L:c:\windows\system.dat /R:c:\windows\user.dat /E myreg.reg

In case you have multiple user profiles: (change "user_name" with your user name, name of directory under \windows\profiles where your user data are stored ex. if your user name is John it will look like \windows\profiles\john\

regedit /L:c:\windows\system.dat /R:c:\windows\profiles\user_name\user.dat /E myreg.reg

Wait for regedit to return to command prompt. If it doesn't return to the command prompt, than something must be wrong!

5. Type (in c:\windows):
attrib -s -h -r system.dat
attrib -s -h -r system.da0
attrib -s -h -r user.dat
(if use multiple user profiles do this in your user directory:
\windows\profiles\user_name\)
attrib -s -h -r user.da0
(if use multiple user profiles do this in your user directory \windows \profiles \user_name\)

Now DELETE system.dat, system.da0 (in \windows) user.dat and user.da0 (OR from \windows \profiles \user_name IF you use multiple user profiles, if that's the case, LEAVE those in \windows directory. DO NOT DELETE THEM, delete only those from your user directory. If you do not have multiple user profiles, than you need to delete the ones from \windows directory)

6. Enter (in \windows directory)

regedit /L:c:\windows\system.dat /R:c:\windows\user.dat /C myreg.reg

7. Reboot your computer (DO NOT START WINDOWS WITH "WIN"!!)

8. If any kind of error happens, you can copy system.dat & user.dat files you have backuped before, back to \windows directory.

9. Now you can compare sizes of old system.dat & user.dat and new ones (to view them in explorer you have to turn on "show all files" option in Windows explorer view menu)


Method 3
FIRST; BACKUP YOUR REGISTRY.
WRPV3.ZIP is the Best and easiest Registry Backup/Restore I've Seen. Download HEAR

Re-build Your Registry From Scratch

NOTE: You'll have to reload some of your applications with this method.

First make sure sure you can access your CD-Rom when hiting the F8 when the "Starting Windows 95" appears. If not be sure to run your Cd-Rom install disk before hand.

START
Re-Boot and hit the F8 Key when you see "Starting Windows 95" message. Choose Command Prompt only.

Rename registry files by typing the fllowing pressing Enter after each Line!!!!!

cd\windows
attrib -s -h -r system.dat
ren system.dat system.xxx
attrib -s -h -r user.dat
ren user.dat user.xxx
attrib - s -h -r system.da0
ren system.da0 system.yyy
attrib - s -h -r user.da0
ren user.da0 user.yyy
cd\
attrib -s -h -r system.1st
ren system.1st system.zzz

(What you have just done is renamed all registry file so you can start with Fresh registry!


  • Back To The Top    • Back To Home