Sarasota PC Monitor
Tech talk (5/97)
Recovering the Windows Registry
by Brian K. Lewis, Ph.D.
Member of the Sarasota Personal Computer Users Group, Inc.If you have been using Windows 95 for some time, you have probably realized that the Registry is a rather important file. Actually, it is as important as the IO.SYS and the MSDOS.SYS files that are needed to boot your computer. The Registry serves as the central configuration store for user, application and computer-specific information. It replaces the WIN.INI, SYSTEM.INI, PROTOCOL.INI and application specific INI files that were found in earlier versions of Windows. It also contains all the plug and play resource information for the hardware.
The Registry is made up of two DAT files that contain system-specific information (SYSTEM.DAT) or user-specific information (USER.DAT). These are hidden system files located in the Windows subdirectory. If these files are damaged, Windows 95 will not run except in "SAFE" mode. Running in "SAFE" mode may prevent you from using some programs or some of your hardware. It doesn't allow you to use any third-party video drivers and will run only in the lowest resolution mode. So having a backup copy of your Registry files is very important should you ever need to restore it.
What you may not realize is that not every backup program will make a backup copy of your registry. Without the registry information, you cannot fully restore all the information needed for your specific programs and hardware. Although Windows 95 does make a backup copy of the registry every time you start Windows, both copies of the registry can be damaged. So if you get an error message stating that the Windows registry is damaged, what do you do? You very quickly learn that Windows will not run in anything other than "SAFE" mode, once you get this error message.
If you have not made a backup of the registry, or if your tape backup program runs only under Windows, then you have to try to do a restore from the command prompt. So restart your computer, at the "Starting Windows 95" message, press the F8 key. This displays the Startup menu. Select the "Safe mode command prompt only" choice from the menu. At the C prompt change to the windows subdirectory (folder). You then have to change the attributes for the SYSTEM.DAT file so you can rename it. Type the following command (without the quotation marks: ."ATTRIB -s -h -r SYSTEM.DAT". Then rename the file to SYSTEM.BAD, something similar. Next, reboot your computer. Windows will use the file SYSTEM.da0 when it cannot find system.dat. If Windows now runs, you have solved your problem.
However, if the SYSTEM.da0 file is also damaged, then you may have to go back another step. So back you go to the safe mode command prompt. Change to the Windows folder as before and change the attributes for SYSTEM.DAT. Now rename SYSTEM.DAT to SYSTEM.XXX. After that, change back to the root directory (cd \). Type the following command (without the quotes): "ATTRIB -s -h -r SYSTEM.1st". Then copy the system.1st file to the windows folder as SYSTEM.DAT. Now type the command "ATTRIB +s +h +r SYSTEM.1st". This process takes the system information created when Windows 95 was originally installed and uses it for the registry. If the USER.DAT file is intact, then you can probably run Windows without any problem. When it runs for the first time, you may need to have diskettes for any hardware you added after you installed Windows.
After all this, Windows still may not run. The final option is to reinstall Windows 95. However, before you do that you should rename all the system and user files so that new ones will be created with the new installation. So you have to change the attributes for system.dat, SYSTEM.da0 and USER.DAT. These files are in the Windows folder. Then change the suffix to something else such as OLD, BAD or XXX and YYY. Then do the same for the SYSTEM.1st file that is in the root directory. After this, reinstall Windows from your CD-ROM or your diskettes.
Of course, it would have been much easier if you had a backup of your registry files that you could access from a bootable floppy disk. Microsoft has provided two different programs to help you do this. The first, and most important is the Emergency Recovery Utility (ERU). This program is part of the Windows 95 Resource Kit, but it is also provided on the Windows 95 CD-ROM. You can find it in the other\misc\eru folder. I suggest moving this to the backup folder in the windows folder on your hard drive.
Using the program is no more difficult than double-clicking the ERU icon and putting a bootable floppy in your a: drive. The program will copy your system files, including the registry, to the floppy along with a program called ERD.EXE. To restore your files, all you need to do is to run the ERD program from the command prompt. You can do this by booting from the floppy or by booting to the command prompt by pressing F8. Of course, every time you change your hardware or software, you should run ERU. That will ensure that you have a current backup of your registry and other configuration files.
The other backup program is Configuration Backup Tool (CFGBACK.EXE). This file is also found on the Windows 95 CD-ROM in the other\misc\cfgback folder. It also has a help file that can be placed in the Windows\help folder. This help file provides the information needed to backup or restore the registry. The configuration backup tool backs up the most important sections of the registry and puts them in a compressed file called REGBACK<X>.RBK. The <X> is a number from 1 to 9.
I strongly suggest that anyone using Windows 95 use both tools to maintain a current backup of the Registry. Either one can be accessed from a floppy disk. However, the Configuration backup can not be run in safe mode. I consider the ERU to be the most important of the two. Whatever else you do, be sure to backup your registry. It will save you a lot of grief in the end.
Dr. Lewis, a former university & medical school professor, is currently a computer consultant and a part-time computer instructor for Sarasota County Technical Institute. He is available, on a fee basis, as an on-site consultant to help you with your home or business computer problems. He can be reached via e-mail at bklew@ix.netcom.com or voice mail at (941) 925-3047.
Return to Brian Lewis' Index
Return to Columnist's Index
Copyright 1997. This article is from the May 1997 issue of the Sarasota PC Monitor, the official monthly publication of the Sarasota Personal Computer Users Group, Inc., P.O. Box 15889, Sarasota, FL 34277-1889. Permission to reprint is granted only to other non-profit computer user groups, provided proper credit is given to the author and our publication. We would appreciate receiving a copy of the publication the reprint appears in, please send to above address, Attn: Editor. For further information about our group, email: spcug@netline.net Web: http://www.spcug.org/
The Sarasota Personal Computer Users Group, Inc. has 1,000+ members and was established in 1982. We are members of the Assoc. of PC User Groups (APCUG), the Florida Assoc. of PC Users Groups, Inc.,the Assoc. of Shareware Professionals and we are members of the America Online Ambassador Program.
See http://www.spcug.org for all reviews from the Sarasota PC Monitor, go to the Newsletter Section.