Windows 98 Corrupt Registry Recovery on Boot

When Microsoft Windows 98 encountered a corrupt registry during startup, it utilized a built-in utility called the Windows Registry Checker (Scanreg.exe) to automatically detect the damage, halt the standard boot sequence, and restore the system using a recent, uncorrupted backup archive. This automated process resolved a major vulnerability found in Windows 95, where a corrupted registry often prevented the operating system from booting altogether without manual user intervention.

The Role of Scanreg.exe

Windows 98 separated registry management into two environments: Scanregw.exe for protected mode inside Windows, and Scanreg.exe for real-mode MS-DOS. During each daily startup, Windows triggered a registry integrity check. If the operating system detected data corruption, bad clusters, or structural damage inside the core registry files—SYSTEM.DAT or USER.DAT—it bypassed the graphical interface loading process and dropped directly into real-mode MS-DOS to execute Scanreg.exe.

Automated Backup and Restoration

The recovery process relied on automated daily snapshots that Windows 98 created upon successful boots:

  1. Daily Snapshots: By default, Windows 98 maintained five rolling backup archives named rb000.cab through rb004.cab, stored in the hidden directory C:\Windows\Sysbckup.
  2. Archive Contents: Each CAB file contained clean copies of four critical configuration files: SYSTEM.DAT, USER.DAT, SYSTEM.INI, and WIN.INI.
  3. Automatic Replacement: Upon detecting corruption at boot, Scanreg.exe scanned the Sysbckup directory for the most recent valid archive. It then extracted the healthy copies of SYSTEM.DAT and USER.DAT directly over the corrupted files in the C:\Windows directory.
  4. Reboot: Once the replacement completed successfully, the system prompted the user to restart the computer, allowing Windows 98 to boot normally with the restored settings.

Manual Recovery via MS-DOS

If the automated repair process failed—such as when the most recent backup was also damaged—Windows 98 provided manual recovery options through the MS-DOS command prompt:

  • scanreg /restore: This command displayed a menu of the five available CAB archives alongside their creation dates and status (e.g., "Bootable" or "Not Started"). Users could manually choose an older snapshot known to be stable.
  • scanreg /fix: If no backups were available or functional, this command attempted to rebuild the existing registry by stripping corrupted data blocks, repairing cross-linked entries, and rewriting clean versions of SYSTEM.DAT and USER.DAT.