Windows 7

Resolving Registry Corruption

As we have mentioned, in some cases when the Registry detects inconsistencies in the Registry because "dirty" data has been written, it will attempt to self-repair during the bootup process. However, while poorly written software and drivers may not pollute the Registry with actual dirty data, they may leave the Registry in an unstable status or with areas of untidiness, which may create system instabilities whenever these areas are accessed.

Windows provides several tools that administrators can use to restore the Registry to a reliable state, including System File Checker, ChkDsk, System Restore, and Driver Rollback. You can also use third-party tools that will help repair, clean, or defragment the Registry.

System File Checker

System File Checker (SFC) is a legacy tool that still works on modern operating systems using an administrative command prompt. SCF seeks to check the integrity of each system file that exists within the Windows installation including Internet Explorer. A corrupted Windows system file can cause system instability and security vulnerabilities, and can lead to suboptimal performance during normal operations.

To invoke SFC, perform the following actions:

  • Insert your Windows DVD install media (but do not launch setup).
  • Open an administrative command prompt.
  • Type: sfc /scannow and press Enter.

SFC is included with all versions of Windows, but if you are attempting to run SFC on a Windows system that has been updated with one or more service packs, you will need to provide a DVD (or mounted ISO) of the Windows installation files that include the applied service patch. This is because SFC will check and use the SP versions of the system files to replace corrupted files.

Note:
SFC will take a long time to complete. SFC will check each system file for integrity and will repair any damaged system file that it finds.

SFC is not intended to be a regularly used troubleshooting tool; consider using it only when you encounter issues that relate to an unstable system.

ChkDsk

Another legacy tool, Check Disk (ChkDsk and ChkNTFS), will scan the computer's hard drives for errors and fix them. The tool requires administrative credentials to run since it operates at a low hardware level and needs to have exclusive access to the disk if fixing issues.

To run ChkDsk, open an administrative command prompt, type the following, and press Enter.

ChkDsk C: /F

Running the ChkDsk tool on the System drive will result in the task being scheduled to run at the next system restart.

Any hard drive that is starting to fail to read or write data to the disk correctly is very likely to lead to file corruption on the system. Normally if the PC encounters a corrupted data file, this will result in some data loss and ultimately require the user to recover their files from a backup or File History. You should be specifically interested in corrupted Registry files as these can cause the system to hang or, more likely, crash.

Whenever Windows attempts and fails to read data from a corrupted system file, page file, or the Registry, Windows will display a Stop error, commonly known as a blue screen of death. If this happens, you should immediately troubleshoot your system to establish whether this is an isolated incident or whether the blue screen is an early indication of likely drive failure resulting in widespread file corruption and Windows instability. Drive failure may sound catastrophic, and it is, but normally some time prior to this a drive will exhibit the aforementioned failures, which are typical symptoms of bad sectors-areas of a disk that have become unusable. Most bad sectors are caused by physical disturbances such as voltage surges, physical damage, or manufacturing defects.

Software tools such as ScanDisk and ChkDsk are available for users to try to recover data. Typically once a bad sector is identified, the system marks it as bad so it will be hidden from the operating system and never be used again for data.

Windows 8.1 updated the Chkdsk tool so that it will run automatically in the background and actively monitor the health of NTFS volumes. Should a file system corruption be detected, NTFS now self-heals most issues when Windows is running, without requiring the tool to be run from an offline repair tool such as a recovery drive.

Note:
Under normal operational conditions you will not need to run Chkdsk if you use Windows 8.1 as the OS now monitors the file system for corrupted or bad sectors and fixes the problems as a background task.

CCleaner

Although we have already introduced the popular CCleaner tool from Piriform, it is worth including it again here in relation to resolving common Registry corruption issues.

As discussed earlier, whenever software applications and hardware drivers are installed or removed from a PC there will be inevitable issues with leftover or orphaned fragments and incomplete or obsolete entries.

A Registry cleaner will carry out some or all of the following activities:

  • Scan your Registry for unwanted/malicious entries
  • Remove unwanted/malicious entries to mitigate against Registry bloat
  • Remove outdated or superseded files
  • Create backups of the Registry
  • Remove incorrect file and program associations
  • Restore the Registry if any maintenance task fails
  • Defragment the Registry to remove any vacant spaces (empty placeholders left behind in the Registry)
  • Repair or remove system files such as orphaned or shared DLL files, and locate device drivers no longer required and old ActiveX files
  • Schedule scans to ensure that the Registry is scanned and errors are repaired automatically

Many third-party Registry cleaners will remove excess bloat and keys that are no longer relevant to the current system by deleting the unwanted keys and then defragmenting the Registry files.

System Restore

Turned on by default, System Restore has been a key recovery component of Windows for many years and can be extremely useful to recover a system that has encountered a variety of problems. One of the key aspects that we like is that the tool can be used by users of any ability, and can be initiated from either the Graphical User Interface (GUI) or, if the GUI is not stable or accessible, then from the Advanced Startup options within Windows 8.

System Restore is designed to apply a previously working snapshot (or system state) to your PC from an earlier date (such as yesterday or this morning), before it became corrupted, infected, or otherwise problematic-such as an infection with malware or a faulty driver. System Restore can be accessed via System Properties; select System Protection.

Note:
Many third-party Registry cleaners will remove excess bloat and keys that are no longer relevant to the current system by deleting the unwanted keys and then defragmenting the Registry files.

Windows 7 improved System Restore by allowing users to view a list of applications that might be affected by using System Restore. For any application other than a simple self-contained executable (such as Procmon.exe), this can be a big deal. Newly installed programs will not work after a System Restore recovery because the application entries within the Registry will not be restored during the restoration process, causing the software to fail when launched unless they are reinstalled.

Restore points are stored on the local system and managed by Windows automatically. They will be triggered when the following activities take place:

  • Installation of new application
  • Installation of device driver
  • User manually creates a restore point within the System Properties dialog box by clicking Create

To restore a PC that has become unresponsive or keeps crashing, use one of the following options.

Launch System Restore from Within the GUI

If you are using Vista, Windows 7, or Windows 8, you can launch the System Restore wizard by performing the following steps:

  • Select System from the Administrative menu (Windows+X in Windows 8 and 8.1).
  • Select System Protection.
  • Click the System Restore... button.
  • Choose the recommended restore point, or show more restore points.
  • Click Next and follow the wizard instructions, allowing the PC to reboot.
  • Once the process is complete, Windows will display the System Restore notification screen, which will advise if the process was successful or if the restore point could not be applied.
Note:
ystem Restore has always received mixed reviews from IT professionals; some like the tool, while others have little faith in its abilities. Our experience is that the tool is very credible and works well, especially on well-maintained systems. It remains a valuable tool in our troubleshooting toolkit and, being wizard driven, is generally not prone to user error.

Launch System Restore from the Advanced Options Menu at Startup

On a Windows 7 PC, reboot the system and press F8 during the boot-up phase of startup, prior the "Starting Windows" logo being displayed. You should then see the Advanced Boot Options. To start the System Restore wizard, select the Repair Your Computer option.

If you are using Windows 8 or later, you can also invoke the Advanced Startup tools from within the GUI. If your PC will not boot into Windows due to startup failure, then the OS should automatically restart in the Recovery Environment and offer you options to help troubleshoot your PC.

If your PC does not offer you the recovery environment, insert your Windows 8 or later DVD or Recovery Disc and follow the "Press any key to boot to the DVD" prompt. Click Next, and then click Repair your computer. On the Choose an Option page, select Troubleshoot.

On the System Restore screen, choose the operating system that you want to restore and then click Next. The System Restore wizard will now run, and you will be able to follow the wizard as it prompts you to select the appropriate restore point and then restart the PC.

[Content] [Next]

In this tutorial:

  1. Troubleshooting a Corrupted Registry
  2. Resolving Registry Corruption
  3. Automatic Startup Repair