Backing up and Restoring the Registry in Windows 98

Module compatibility: What's this?
Materials:
Working complete PC
Blank Diskette
Student Diskette, "New Boot A Ver 2.0+"
Student CD-ROM, "Room 6359"
Objectives:
The student will learn the basic functionality of the Windows Registry Checker, and
Learn the general concepts of the Registry Checker, SCANREG.EXE, including,
The nature of the Registry Files and their backups, and
The nature of the settings file SCANREG.INI, and
How to use this file to control SCANREG.EXE's behavior.
Competency:
The student will build understanding of the nature and function of the Windows Registry and the Windows Registry Editor, and learn how to use the Registry Editor to create a new Key within the Registry.

    Preparation

  1. Windows 98 comes with a 16 and 32 bit version of a program called SCANREG. The 16-bit version: SCANREG.EXE can be executed in real mode which is critical to its usefulness since it can be used to restore the registry as well as to back it up. One of the main reasons that the user would be restoring the registry is because the GUI stages of the OS are crashing, hence the real mode version of the utility.

  2. The 32-bit version of the utility is called SCANREGW.EXE. It is important to understand the differences between the 16-bit and the 32-bit versions of the program. Just like scandisk, if the program detects the GUI stage of the OS active, it will automatically run SCANREGW.EXE rather than SCANREG.EXE. It happens that SCANREG.EXE is the only one that can perform the registry restores though both can perform the backup.

  3. Procedures

  4. To perform the backup in Windows do: Start > Run > Scanregw > OK. Scanregw will perform an integrity check and then offer to create a new backup of the registry, go ahead and let it create a new backup. To create a backup in real mode do: Start > Shutdown > Restart in MS-DOS mode > OK. Then from the prompt execute: scanreg /backup

  5. Which brings up the issue of what files make up the registry and where are the backups kept. The registry itself in Windows 95/98 is stored in two hidden files in the C:\WINDOWS directory named SYSTEM.DAT and USER.DAT. In Windows ME a third file named CLASSES.DAT is also part of the registry. The backups are kept in a hidden folder called C:\WINDOWS\SYSBCKUP. Within this folder which contains quite a few files (critical drivers mostly) are the backups themselves which are named RB00x.CAB (See File Types) where the x is a digit starting with zero. While scanreg numbers the backups it will reuse numbers meaning that RB000.CAB may be the latest backup if RB004.CAB exists because the default number of backups to keep is five. The best way to tell which backup is the latest is by the Time/Date stamp displayed by DIR.

  6. The files that scanreg automatically includes in these backup CABs are SYSTEM.DAT, USER.DAT, SYSTEM.INI, and WIN.INI. It would be a very good idea to include the file VMM32.VxD in the backup since it cannot be extracted from the installation CABs in the event that it gets damaged.

  7. The way to do this is to edit the file SCANREG.INI. This text file will reside in the same folder as SCANREG.EXE (the C:\WINDOWS directory). Open the file with Notepad in Windows or EDIT in DOS. Here are the parameters that can be controlled and examples of changes to the defaults:

  8. Once the desired changes have been made to the content of the SCANREG.INI file save it and exit the text editor that you are using. Delete all registry backups in the SYSBCKUP folder:


    C:\WINDOWS\SYSBCKUP>del rb*.cab

    Then run scanreg and check to be sure that the new backup exists:

    C:\WINDOWS\SYSBCKUP>scanreg /backup
    C:\WINDOWS\SYSBCKUP>dir rb*.cab
     Volume in Drive C has no label
     Volume Serial number is 2ADE-0104
     Directory of C:\WINDOWS\SYSBCKUP
    RB000    CAB    629,219 10-29-03  12:42p
             1 file(s)       629,219 bytes
             0 dir(s)  1,202,444,288 bytes free
    C:\WINDOWS\SYSBCKUP>_

  9. Check the contents of the new backup CAB by running extract like this:


    C:\WINDOWS\SYSBCKUP>extract /d rb000.cab

  10. In the event that the Registry has become corrupt you can restore it using SCANREG.EXE. Often the Registry can become so damaged that Windows fails to bring up the desktop at all. Regardless of whether Windows can launch or not, you must boot the PC to MS-DOS mode in order to perform the Registry restoration. This can be done with a boot diskette or by pressing the [F8] key after the BIOS screens (as IO.SYS loads). At the boot menu select "Command Prompt Only". From the C: prompt run SCANREG with the restore switch and then try to launch Windows manually:


    C:\>scanreg /restore
    C:\>win

  11. Also note that if there exists more than one backup of the Registry you will be prompted in a full blue screen utility window similar to SCANDISK in appearance which one you would like to use to perform the restoration. You should try the last one that you manually created. This is one reason why technicians should turn off the automatic backup feature of SCANREG by modifying the entry in the SCANREG.INI file.

Back to Page Top

Copyright©2000-2004 Brian Robinson ALL RIGHTS RESERVED