HelpWithWindows | Windows Forum | RoseCitySoftware





Windows 98 > Getting Started With Windows 98


Using ScanReg

By:

Another of those enhancements 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":

  1. Start Windows in MS-DOS mode (press the Ctrl key as soon as your PC starts. This will get you the Bootup menu. Once the menu is up, choose Command prompt only)
  2. Type Scanreg /restore at the prompt
  3. You will get a screen where you can select which registry backup to use
  4. Choose your backup and press Restore
  5. When ready you'll be prompted to Restart your computer

If you receive an Out of Memory error message when you try to run Scanreg with the /restore (or /fix) switch, you need to free conventional memory. ScanReg needs 340KB or more conventional memory, depending on the size of the registry and the amount of damage.

To increase the amount of free conventional memory, restart your computer, press and hold down the Ctrl key until the Windows 98 Startup menu appears, and then choose Safe mode command prompt only. Then, run Scanreg.exe with the /fix or /restore switch.

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.

The "/comment=<text>" switch can be used by itself or with the /backup switch. For example, you can type either of the following commands at a command prompt:

scanreg.exe "/comment=registry backup 5 June"

scanreg.exe /backup "/comment=registry backup 5 June"

The first command line starts the Registry Checker tool graphical user interface (GUI) and prompts you to create a registry backup. The second command line creates a backup copy of your registry and adds your comment without starting the Registry Checker tool GUI.

Go to this page to customize ScanReg.

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.

When you configure Windows to use user profiles and run the Windows Registry Checker tool (Scanreg.exe) to back up the computer registry, the User.dat files that are associated with each profile are not backed up.

For more information see Microsoft Knowledge Base Article 245147.


Error Messages

When you use the scanreg /restore command at a command prompt in MS-DOS mode to restore the registry, you may receive an error message stating that the registry was not restored.

See Microsoft Knowledge Base Article 228779 for a possible solution.


When you restore a previous registry using the scanreg /restore command, you may receive the following error message:

	Microsoft Registry Checker
	System restore operation failed

See Microsoft Knowledge Base Article 245412 for a solution.


When you attempt to manually restore a previous copy of your computer registry using the scanreg command with the /restore switch (scanreg /restore), you may receive the following error message:

	Restore Operation Failed

See Microsoft Knowledge Base Article 220878 for a solution.




Software Products, Spotlight of the Week, Partners, RCS newsletter, Corporate Sales, List with us