Fix and Restore Registry
Win 98 - Using ScanReg
An enhancement which should make using Windows 98 more user friendly is the ScanReg Registry Checker.
Each day, after a successful boot, a backup copy of your registry is created (containing the System.dat, User.dat, System.ini and Win.ini files). By default Windows 98 allows you to keep up to 5 copies (rb???.cab - rb???.cab) of your registry (which are saved in the \Windows\Sysbckup folder by default), saved in Windows cabinet files (*.cab).
When Windows notices a problem with your registry, it will automatically replace the registry with a backup copy. The good thing about this new feature is that you can easily restore a previous registry "by hand":
Now for those of us who regularly install Shareware programs, only to find after a day that the don't bring what we expected, this is a great way to keep the registry clean. Before you install a new piece of software, run ScanReg (click Start > Run and type scanreg in the Open dialog box. Windows will scan your registry, and when it doesn't find any errors, will prompt you to back-up your registry. At this stage you would choose Yes.
Now if you find after a day that you don't like the program you installed, just uninstall the program in the normal way (see the help- or readme file accompanying the program) and restore the registry you made just before you installed the program, using the method described above.
ScanReg Command-Line Switches
These are the command-line switches supported by ScanReg:
| Switch |
Description |
| /autoscan |
Automatically scans the registry and backs it up without displaying any prompts if there is already a backup for that date. |
| /backup |
Backs up the registry and related files without displaying any prompts. |
| "/comment=<text>" |
Enables you to add a descriptive comment to the registry backup. |
| filename |
Scans the registry file specified and displays a message indicating whether or not any errors were found. This switch does not back up the registry. |
| /fix |
Repairs any damaged portions of the registry, and optimizes it by rebuilding it without unused space. |
| /opt |
Compacts the registry. It will automatically do this during its boot up check if there's more than 500KB of empty space. It will also do this when running /fix. |
| /restore |
Displays a list of available backup files, sorted by the date and time the backup was created. |
| /scanonly |
Scans the registry and displays a message if any errors are found. This switch does not back up the registry. |
Note: If you made any changes to the system after you made the backup of the registry, these changes will be undone when you restore the older registry.
Restore Registry in WIN 95 (not easy !)
Every time your computer boots up successfully, Windows 95 creates backup copies of its Registry files. These backup files, System.da0 and User.da0 (zero, not the letter O) are hidden files in the Windows folder.
If you don't have system.da0, check to see if you have another backup of the registry file. To do this, type dir system.*/s at the C: prompt. Note that a registry backup should be at least 1MB in size, usually 2MB.
If there is one, copy it to c:Windowssystem.da0.
To restore your Registry from Windows 95's backup files, start by choosing Shut Down... from the Start menu. When the Shut Down Windows prompt appears, choose Restart the Computer in MS-DOS Mode and click OK. Your computer will reboot to the DOS C: prompt.
Next, switch to the Windows directory by typing cd windows and pressing [Enter]. The DOS prompt should now look like C:WINDOWS. At this point, issue the following commands, pressing [Enter] after each:
attrib -h -r -s system.dat
attrib -h -r -s system.da0
copy system.da0 system.dat
attrib -h -r -s user.dat
attrib -h -r -s user.da0
copy user.da0 user.dat
Finally, reboot your computer a second time.
Now, all of that was a pain that you won't likely want to go through again. So, in the future, back up your system registry to prevent this from happening! If you can only back up one thing on your computer (with the exception of your novel or some other personal file), the system registry is it.