Better living through a healthy Registry


When Windows 98 wants to know what kind of graphics card, hard disk, or other hardware is installed in your PC, it goes to the Registry. And if it doesn't find the answers it's looking for, it gets very upset and can instigate all kinds of problems, ranging from trivial to catastrophic. So it pays to take good care of your Registry.

Under Windows 95, maintaining and repairing the Registry is cumbersome at best. Fortunately for Windows 98 users, Registry Checker, a new utility in the OS, makes those tasks much easier.

Taking care of the Registry means watching over two files, system.dat and user.dat. Both are hidden files found in your Windows folder. They contain all the hardware, software, and user settings for your PC. If the files are damaged ù due to an improper system shutdown or a hard disk problem, for example ù individual applications may not work properly, or your system may crash and refuse to start.

Registry Checker optimises these files and safeguards them against future problems. Each time you launch Win 98, the utility automatically optimises your Registry. If it finds 500KB or more of outdated entries, it removes them, shrinking the size of those .dat files. This makes the files more convenient to back up and store, and also accelerates Win 98's launch and shutdown. Next, Registry Checker scans the .dat files for damage. If you're lucky, it won't find any problems. And when you're faced with crashes, Registry Checker can save you hours of troubleshooting.

 

Backup basics

The best way to fix a damaged Registry is to replace the current system.dat and user.dat with healthy backup copies. Before Registry Checker, keeping up-to-date backups meant manually copying those files and ù if you were smart ù storing them on a separate drive. Each time Windows 95 launches, it does store a backup copy of each of these files ù called system.da0 and user.da0 ù in the Windows directory. But these backup files are often of limited value; by the time you realise you have a serious problem, you've probably restarted Windows at least once and overwritten the good backups with damaged originals.

Registry Checker partially avoids this pitfall by making multiple backups. The first time Windows 98 launches each day, Registry Checker automatically backs up both Registry files and stores them in a single file in the Windows\Sysbckup folder. Note: If you haven't rebooted in a few days, you can still trigger an automatic backup by selecting StartûRun, typing scanreg, and then following the on-screen instructions for performing an impromptu Registry backup.

The backup files are compressed and saved as .cab files and named "rbxxx.cab", where "xxx" is the number of the backup ù 001, 002, and so on. But the numbers don't correspond to the backup date. To find the most recent backup, check the modification date of the files in Explorer.

By default, Registry Checker stores only five backup copies of the Registry. With each new backup thereafter, it overwrites the oldest file. So you may feel more secure using a copy that goes back more than five days. If you wish, you can set the Registry Checker to create a maximum of 99 backup copies. Click the Start button, select Run, and type scanreg.ini. This will open the file in Notepad. Look for and edit the line that says MaxBackupCopies=x, save, and close. (Other Registry Checker settings are also found here.)

Tweak Registry Checker to fit your needs

KEY OPTION

ACTION

SETTINGS

Backup=

Runs Registry Checker at first launch of each day.

1: enabled (default)

2: disabled

Optimize=

Removes wasted space from the Registry files system.dat and user.dat each time Registry Checker runs.

1: enabled (default)

2: disabled

MaxBackupCopies=

Sets the number of sequential backup copies to be made.

5: backs up 5 copies (default)

Maximum is 99

BackupDirectory=

Determines directory where backup .cab files are stored.

default is c:\windows\sysbckup

Files=

Adds extra files to the .cab backup file.

file names with full paths separated by commas, eg c:\autoexec.bat, c:\config.sys

Caption: Use scanreg.ini to set the number of backups and add files to Registry Checker's automatic backup

But more isn't always better. For every five compressed Registry .cab files, expect to sacrifice 2MB to 5MB of disk space. I recommend keeping the default at five backups ù that's enough to protect you from most Registry emergencies.

It may take longer than five days ù or five backups ù to discover a Registry-related problem. My solution: Supplement Registry Checker's backups with selective manual backups immediately before and after you install any new hardware or software. The reason for a pre-installation backup file is obvious, but a post-installation backup file is just as important. If a problem arises weeks after the installation and isn't caused by the recently installed hardware or software ù but rather by a disk problem or random software conflict, for example ù the post-installation backup file can get you up and running without the hassle of a reinstallation.

To back up the Registry manually with Registry Checker, use StartûRun, type regscan.exe, and select Yes when prompted to make a backup. This will create a .cab file as described above. To prevent this file from being overwritten, rename it with the name of the hardware or software you're installing and either "before" or "after" (for example, sblaster_before.cab or AOL_after.cab).

By default, Registry Checker places four files in a .cab file: system.dat, user.dat, system.ini, and win.ini. (The latter two files are vestiges of Windows 3.1, retained for compatibility with older software that looks to those specific files for configuration data.) If you want to add other files, for example, autoexec.bat and config.sys, place their names and locations under the Files= entry in scanreg.ini.

Registry Checker comes in two flavours, Windows (scanregw.exe) and DOS (scanreg.exe). Each has its own capabilities. If you want to restore a Registry backup or make backups from DOS, you have to do so with scanreg. And you have to start scanreg.exe from a DOS prompt in MS DOS mode ù get there via StartûShut DownûRestart in MS-DOS mode. If you try to run scanreg.exe in Windows, you'll get scanregw.exe instead.

Scanreg repairs, restores

FEATURE

DOS

WINDOWS

Creates backup of Registry files

Yes

Yes

Launch command

scanreg

scanregw

Repairs corrupted Registry

Yes

No

Restores Registry from backup

Yes

No

Runs automatically

only if damaged file is detected

on each Windows launch

Runs in safe mode

No

Yes

Scans Registry for damage

Yes

Yes

In scanreg.exe select StartûView Backups. You'll see a list of the current backup files with creation dates. Select a file, and Registry Checker will restore it. But scanreg.exe sees ù and lets you restore ù only files whose names fit the rbxxx.cab format. To restore files you've saved with non-standard names, open Explorer, find the .cab file you want to restore, and double-click it. You'll see the files stored in that .cab; just copy the files you want to restore over the originals, and reboot.

û Kirk Steers


Category:win98, hardware, win95
Issue: February 1999

These Web pages are produced by Australian PC World © 1999 IDG Communications