Windows Repair Utilities and Procedures

 < Day Day Up > 



Windows comes with various programs and procedures to troubleshoot and repair problems. Some of these can be used at will, but others require a backup of one type or another to have been performed first. Now, if you are a technician who maintains computers, or if you maintain your own personal computers and their continued performance is important, you should perform regular backups. If you work in a repair shop, chances are very good that your customers didn't back up the OS before bringing the machine to you, although some make copies of their important user data. If they knew how to perform these OS backups, they would most likely know how to restore the OS themselves. Given that advice, you'll be able to determine which of the following procedures are most useful to you.

Safe Mode Boot (All Versions)

In the event that Windows is loading some program or device driver that is causing a problem, you can boot into Safe Mode (the system might force you to) and try to fix the problem. Safe Mode loads only essential drivers and programs. You won't be able to print, get on a network, hear sounds other than beeps, and so forth, but you will be able to make changes in Device Manager, .ini files, and other places. Press F8 as early in the boot process as possible to boot into Safe Mode.

System File Checker (98, 2000, and XP Only)

Microsoft developed this utility for Windows 98, put a different version in 2000 and XP, but inexplicably left it out of Windows Me. System File Checker scans the system files for corruption or unauthorized replacement by rogue programs, and retrieves a correct version from either a special system folder or the Windows installation CD-ROM.

System File Checker (SFC) in Windows 98

In the Run dialog from the Start menu, type "SFC." This invokes the program, as shown in Figure 11.8.

click to expand
Figure 11.8: Windows 98 System File Checker.

You can go into settings by clicking the button, but the default settings are generally the best. You'll want to be prompted to replace each corrupted file so that if the problem appears to be solved, you'll be able to tie the problem to the corruption. Figure 11.9 shows such a prompt.

click to expand
Figure 11.9: SFC prompts you to restore the corrupted file.

It is a good idea to run SFC every time you install Windows 98, and any time you have a problem that is not easily corrected. One new Windows 98 computer had a sound problem. The sound either sounded terrible or it didn't work at all. Replacing the sound driver didn't help, but a run of SFC found nine corrupted files. Replacing these files solved the problem permanently.

In most installations of 98 (and 95 and Me, as well), there is a system folder whose default path is C:\Windows\Options\Cabs. These contain all of Windows' installation files in a highly compressed state. You might need to navigate to this folder using the Browse button to help SFC find the files to restore. If this folder doesn't exist, you'll have to browse to the Windows 98 folder on the Windows installation CD-ROM.

Note 

When SFC finds a corrupted file and prompts you to replace it, you will be prompted to make a backup of the original system file. Write down the location where SFC is going to place the backup of the file. You should also limit your folder names to eight characters or fewer here so you can find them in DOS in the event that you must restore the file in a no-boot situation. We suggest you accept the default path offered by SFC to keep things consistent.

Extraction of System Files (98 and Me)

Windows Me does have one of the functions of SFC: system file extraction. When you suspect that a particular system file is the cause of a problem, you can use Msconfig in Windows Me to extract the file. When you first open Msconfig (see Chapter 2) you will see the Extract File button near the lower right-hand corner of the window. By clicking here, you can follow the dialog boxes just as you would in Windows 98 SFC. Be sure to make a backup and write down the location of the files just in case the system is unable to boot after you attempt to restart the system.

You can use SFC in Windows 98 without running the file check portion of the program if you know ahead of time just what file you need to replace. You might know this because of a message at boot, or if you get a dialog box or error message when Windows starts indicating that a particular file is not found or is corrupted. Or, you might have been told by a support representative from a component manufacturer to replace a particular file. If this is the case, do so and follow the same steps as you would if you had run SFC and it had found a corrupt file.

Windows 2000 and XP System File Checker

SFC in these versions is a command-line program. It is much less likely to be needed in these systems as compared to 98. Open a command prompt and type SFC. This will give you the list of command switches shown in Figure 11.10.

click to expand
Figure 11.10: 2000/XP SFC command switches.

Let's say you want to run it now. At the following prompt, type the following:

SFC /scannow

If you are prompted for the installation CD-ROM, insert it. Then, wait for SFC to work.

Last Known Good Configuration (2000 and XP only)

Each time Windows 2000 and XP boots successfully, it stores a profile of the system in a system folder. If a computer won't boot or develops a serious problem after a change has been made, the next time you attempt to boot, press <F8> and select Last Known Good Configuration (LKG). If the problem was caused by a change made since the last successful boot, LKG will undo it, along with all other changes made since then.

Note 

Any time the computer boots successfully, the LKG is reset to the system's current configuration. If you experience a problem after a change, try not to boot the computer again before you invoke LKG. In case the computer boots successfully but the problem is still not solved, the new LKG will include the problem, causing LKG to cease being an effective tool for that problem.

Windows 9x Registry Repairs

See the Windows 9x Registry section, earlier in this chapter.

Emergency Repair Process (2000 Only)

This process can be especially helpful if you can't boot your computer, as long as your hard drive hasn't failed, in which case the repair process is useless. It is much more useful if you have a very recent Emergency Repair Disk (ERD) made on the computer in question. Chances are excellent that if you are fixing someone else's computer, you will not have such a recent ERD to use. If you start the Windows Backup program (Start > Programs > Accessories > System Tools > Backup, or by typing "ntbackup" in the Run dialog), and you start in the Welcome screen, you'll see an option for making an ERD. Simply follow the prompts.

To repair the system using the ERD, you'll have to boot either from the four Windows 2000 installation floppies, or from the installation CD-ROM. It is easier to boot from the CD-ROM, as long as the computer supports it. You might have to go into the BIOS to move CD-ROM up in the boot order. If you cannot boot from the CD-ROM and you don't have the installation floppies, you'll have to create the floppies from the CD-ROM. Tutorial 11.2 tells you how.

Tutorial 11.2: Creating 2000 Setup Boot Floppies from the CD-ROM

start example
  1. Obtain four floppy disks and label each "Windows 2000 Setup Boot Disk." Number them from 1 through 4.

  2. Insert the Windows 2000 installation CD-ROM in any Windows computer.

  3. The disc will probably start up automatically. If it does, close it. Go to My Computer, right-click the disc, and click Explore from the menu that appears. A Windows Explorer window should appear.

  4. Locate and open the Bootdisk folder, usually by double-clicking.

  5. If the computer you're using is Windows 9x, run (usually by double- clicking) the MAKEBOOT program. If you are on 2000 or XP, run the MAKEBT32.exe program.

  6. Follow the prompts.

end example

Note 

Setup boot floppies do not exist for XP.

To use the ERD, boot the computer using either the CD-ROM or the floppies. Go through Setup as if you are installing Windows 2000. Eventually, you'll get to a prompt to set up or repair Windows. Choose R to repair, and follow the prompts, which will include one to insert the ERD. You will be prompted to select manual or fast repair. Manual repair gives you three options:

  • Inspect Startup Environment: This applies only if the system is a dual-or multiple-boot system, meaning that you get a choice of different OSs when you boot the computer.

  • Verify Windows 2000 System Files: Inspects files needed for Windows to boot and run and replaces them if necessary.

  • Inspect Boot Sector: Inspects and repairs boot sector problems.

    Note 

    Manual repair doesn't give the option to repair the registry, but fast repair does.

Fast repair automatically performs all repair functions, including checking the registry for corruption. If it does find registry corruption, it copies portions from the %systemroot%\Repair\Regback folder (assuming that folder is accessible), where the system keeps the backup registry (%systemroot% refers to the main system folder, be it Winnt\System32, or Windows\System32). This registry backup is made automatically when the ERD is made.

If you don't have an ERD, instead of choosing to repair the system, choose to set up Windows. Follow the prompts and you will soon get another prompt to set up or repair. At this point, choose R to repair the system. This will reinstall Windows over the existing installation, hopefully fixing the problems in the process. Have the product key ready in the event you are prompted for it. Most existing settings, and all non-OS files should remain intact.

Reinstalling Windows 9x Over an Existing Installation

In the discussion about system file checker, we referred to the folder C:\Windows\Options\Cabs (C:\Windows\Options\Install in Me), which is present in most 9x installations. This folder has another purpose. If you are unable to fix a problem with 9x, navigate to it and locate Setup.exe. Note that the default setting for Windows is not to show known file extensions. You can change this setting by going to Tools > Folder Options in any Windows folder, clicking the View tab, and clearing the Hide extensions for known file types check box. If you don't want to change the setting, look for the word Setup followed by an icon that has a picture of a computer with an open box of disks in front of it (see Figure 11.11).


Figure 11.11: C:\Windows\Options\Cabs\Setup.exe from Windows 98.

Note 

It is important to know whether the system you are working on was ever upgraded from an earlier version of Windows. If that were the case, then the setup files found in the C:\Windows\Options\Cabs folder might attempt to install an older version of Windows and cause the installation to fail.

Once you have found Setup.exe, run it (usually by double-clicking) and follow the prompts. You might need to input the product key and other information, so have it ready. It can take anywhere from about 20 minutes to sometimes well over an hour to install Windows depending on the performance of the system. When you are finished, your settings and non-OS files should be intact.

Tip 

Make sure the Windows CD-ROM that you use to reinstall windows is exactly the same version as what is installed in the system. Otherwise, you might get errors or Windows might not allow the installation to continue.

If your system doesn't have a Cabs or Install folder, you can still reinstall Windows from the installation disc. Insert the disc and follow the prompts to install, or open the disc in My Computer and run Setup.exe. When you are prompted to select the folder directory for the installation, selecting the original, usually C:\Windows, will install Windows over the old version, leaving all your settings intact. If you select a different directory, assuming you have enough disk space, you will cause the original Windows installation to be unusable, and your settings will not be kept. Then, you can delete the folder that contains the original installation.

Tip 

It is a very good idea to back up important data files before reinstalling Windows, even when you use procedures that normally leave your files intact.

If reinstalling the system doesn't solve the problem, you might need to back up the data and downloaded program installation files (not actual program files), format the hard drive, reinstall Windows from scratch, reinstall the programs, and restore the data. If you get to a situation in which diagnosing and correcting problems will take an extraordinary amount of time, or when a computer has significant virus infection, this is usually your best bet. Just make certain not to restore any virus-infected data.

System Restore (Me and XP Only)

System Restore allows you to undo system changes made since the last restore point was created. A restore point is a point at which all of Windows' settings are recorded. Multiple restore points can be stored simultaneously. If System Restore is enabled, Windows sets restore points daily and when certain changes are made to the system. The user can also set restore points manually; it is a good idea to do this before installing new hardware or software, or making other significant changes. You would use System Restore to undo changes that you suspect caused problems. This can cause other problems. For example, if you restore to a point before a new program was installed, the program will probably not work correctly or at all afterward, even though all the program's files would be left intact. This is because System Restore removed all the registry entries related to the program. Of course, the new program might have been causing the problem you are using System Restore to fix. The best thing about System Restore is that you can undo a restore. The worst thing about it is that the folder System Restore uses to store the restore point data, entitled "_Restore," can be a receptacle for viruses. The folder is hidden by default, and it is very difficult to delete an individual file in this folder. It is for this reason that some users disable System Restore. See Chapter 2 for advice on deleting infected files from the _Restore folder.

Enabling/Disabling and Accessing System Restore

System Restore is enabled by default. To enable or disable it in Me, go to System Properties (right-click My Computer and select Properties or open the System applet in Control Panel), click the Performance tab, the File System button, and then the Advanced tab, and select or clear the Enable System Restore check box. In XP, go to System Properties and click the System Restore tab. Select or clear the check box. You can also use the slider on this page to set the maximum size of the _Restore folder on this page. Leave it at its maximum setting unless disk space is an issue.

To access System Restore, go to Start > Programs (or All Programs) > Accessories > System Tools > System Restore. From here, you can set a restore point, restore the system, or undo a restore.

Recovery Console (2000 and XP Only)

The Recovery Console is a command-based system, similar to DOS, but has fewer commands. You can use it to access only the root folder, the Winnt or Windows folder, the Cmdcons folder, and removable media sources such as floppies or CD-ROMs. The Recovery Console is good for replacing missing files, stopping or starting services, formatting drives, and other tasks.

There are two ways to run the Recovery Console.

  1. Run Recovery Console from the Windows Installation CD-ROM: Boot the computer from the Windows installation CD-ROM, or the 2000 setup boot floppies. At the "Welcome to Setup" screen, press <F10> or type <R>. In XP, you can start the console. In 2000, you'll have to type <C>. Make sure to have the administrator password handy (if one exists).

  2. Install Recovery Console so that it becomes a choice of OSs available at boot: Insert the Windows Installation CD in the drive, click Start > Run, and type the following in the box (Substitute the CD-ROM drive letter for D if applicable):

    D:\i386\winnt32.exe /cmdcons

Click OK, and then follow the prompts. Chances are good that installation will fail, but you'll be given a prompt to try it again. Do so, and it will probably work the second time. Reboot the computer and select the number for Recovery Console from the list of OSs.

Once you have started the Recovery Console, you'll be prompted to select the OS to which you want to boot, assuming you have a dual- or multi-boot system, and then you'll be prompted for the administrator password.

Using the Recovery Console

For a helpful tutorial on using Recovery Console commands, see the Recovery Console Commands section in Appendix C, "Command-Line Tutorial." You can also type HELP at the prompt and then press <Enter> for a complete list of commands. You can enter any individual command followed by a space and /? (such as DISABLE /?) to view a brief explanation plus the command's syntax and parameters. Additional helpful information is available in Windows' Help (search for Recovery Console Commands), and on the Microsoft Knowledge Base. The article numbers are 229716 for 2000 and 314058 for XP.

Restoration of System State Data (2000 and XP Only)

System state data consists of the registry files and many OS files. A recent System State data backup on a Windows 2000 machine created a 241MB file. Back up System State data by using Windows Backup (Start > Run > ntbackup, or Start > Programs (or All Programs) > Accessories > System Tools > Backup). If you use the Backup Wizard, you have the option of backing up the entire or parts of the system, or only the System State data.

Note 

Windows XP Home Edition does not have the Backup program; however, if you have a retail or OEM copy of XP Home (not a brand name recovery disk), you can install Backup from the disc. Navigate to the VALUEADD\MSFT\NTBACKUP folder on the CD-ROM and double-click the Ntbackup.msi file on the disc to install Backup.

If there is a recent backup of System State data, restoring it is the next step to take if using the ERD fails. If Windows is still running, open Backup and follow the instructions to restore the System State data. If not, you'll have to reinstall Windows, perhaps on a new hard drive, and then perform the restore.

Automated System Restore (XP Professional Only)

Automated System Restore (ASR) is XP Pro's system for backing up the entire OS, including the System State data. It is done through the Backup program, covered earlier.

Note 

If Backup is installed on XP Home Edition as described in the previous note, ASR appears to be available. However, it won't work.

The ASR Wizard recreates every disk partition on which there are Windows OS components. For this reason, ASR will back up user data on those partitions, even though Microsoft insists that ASR won't back up user data. In a system with one disk partition and XP Pro, ASR should be a valid method for backing up and restoring the entire computer. However, because of Microsoft's warnings, you will probably want to back up user data separately.

The ASR Wizard also creates a floppy that is needed for an ASR restore. An ASR backup includes System State data. Microsoft considers an ASR a last resort.

To create a backup for an ASR, open Backup as described earlier, make sure to be in the Advanced mode, not the Wizard mode, and select the ASR option button. You will need one blank floppy and media for the backup.

ASR Restore

To restore from an ASR backup, boot from an XP Pro CD-ROM as described in the section on the Emergency Repair procedure. When prompted, press <F2> to start the restore process, and follow the prompts. You will be prompted to insert the floppy made during the ASR backup, and the backup media.

Backup of All Information on the Computer (XP Pro Only)

If you run Backup in Wizard Mode and run through the wizard, there is a choice to back up "All information on this computer." This is actually a combination of ASR and a full data backup. Just follow the prompts in the wizard. Restore by running Setup from the Windows XP disc and following the prompts to do a restore.

Note 

Neither the "All information on this computer" nor the ASR backup will work on XP Home. To accomplish a backup and recovery in XP Home, you'll have to install Backup from the Windows disk and do a regular full backup. Then, you'll have to reinstall Windows anew and then restore the backup.



 < Day Day Up > 



PC Repair and Maintenance(c) A Practical Guide
PC Repair and Maintenance: A Practical Guide (Charles River Media Networking/Security)
ISBN: 1584502665
EAN: 2147483647
Year: 2004
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net