Not every problem encountered within Windows XP will bring the entire system to a crashing halt. There are a number of minor problems that can occur that range from the inability to use a peripheral device such as a printer or a gamepad, to a software program that is unable to run without crashing, to a malfunctioning system device such as a modem or an audio card. Windows XP includes a number of built-in tools and resources for troubleshooting minor errors that occur within the operating system. Some of these troubleshooting tools and resources are
CHKDSKCHKDSK is a tool you can use to check the integrity of a Windows XP file system, and possibly repair any errors that the tool finds. CHKDSK can be used as a command-line tool, or is available through the Windows GUI (although the GUI version doesn't include all of the functionality of the command-line version). There are a number of switches you can use to determine how CHKDSK will function. If you just type CHKDSK at the command prompt and press Enter without any switches, the program will run as a read-only diagnostic. It will report any errors it finds, but it will not attempt to repair them. Here is a list of the switches you can use with CHKDSK:
Before you use CHKDSK to try to correct a problem with a Windows file system volume, you should make an attempt to back up the data on the volume. Also, if the volume you are scanning is fairly large and contains a lot of data, you may want to have a cup of coffee and a magazine handy; CHKDSK can take a very long time to complete when dealing with large volumes. Using the /i and /c switches can help to reduce the time it takes for CHKDSK to complete its scan of NTFS-based volumes. There is a version of CHKDSK you can run from within the Windows GUI. Double-click My Computer or select it from the Start Menu, and right-click on the volume you want to scan. Click Properties, select the Tools tab, and click Check Now (see Figure 12.7). Figure 12.7. Running the GUI version of CHKDSK while Windows is running.
From here, you can select three options:
Interestingly enough, the CHKDSK utility dates all the way back to the days of MS-DOS. CHKDSK was introduced with the release of MS-DOS 2.0back in 1983! Imagine thata utility that's been around for over 20 years that still exists in today's most popular desktop operating system. DirectX Diagnostic Tool ( DXDIAG.EXE )DirectX is a suite of multimedia- related application programming interfaces (APIs) built into the Windows operating system. Microsoft first created DirectX for the release of Windows 95. DirectX provides software developers with a standardized platform for multimedia application development, which enables them to create software that can access specialized hardware features, without having to write hardware-specific code. DirectX provides improved communication between software and hardware devices, and interacts with practically everything on a Windows PC that involves video, audio, and input devices. As of this writing, the most current version of DirectX is 9.0c, which was released in August 2004. DirectX 9.0c is compatible with Windows 9x/Me/2000/XP. Windows XP includes a diagnostic tool that you can use to troubleshoot issues related to DirectX (see Figure 12.8). The DirectX Diagnostic Tool tells you which version of DirectX is installed on your system. It also displays information regarding the various DirectX-related drivers, and provides a series of user -initiated diagnostic tests you can use to determine if DirectX and the hardware devices it interacts with are functioning normally. This can be a valuable tool for troubleshooting Windows problems related to audio and video problems, and input devices such as gamepads. Figure 12.8. Testing DirectSound with the DirectX Diagnostic Tool.The DirectX Diagnostic Tool does not appear in the Start menu. To launch it, go to the Start menu, select Run, and type DXDIAG.EXE . You can navigate through the DirectX Diagnostic Tool using the tabs at the top of the screen, or by using the Next Page button at the bottom of the screen to go through each tab sequentially. The list of tabs includes the following:
Dr. WatsonDr. Watson is a software debugging program that, in the event of an application crash, writes debugging information to a log file that can be used by a programmer or software technical support expert to troubleshoot the application. To view the Dr. Watson setup dialog box from the Start menu, select Run, type DRWTSN32 , and press Enter (see Figure 12.9). Figure 12.9. Use the Dr. Watson dialog box to configure how debugging data is generated.
There are a number of options you can configure in the Dr. Watson dialog box. The changes that you make using this interface are saved in the Windows Registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DrWatson . The first time you open the Dr. Watson dialog box, the program automatically creates a folder that it uses to store any log files it creates. By default, the path to this folder is Documents and Settings\All Users\Application Data\Microsoft\Dr Watson . You can select a different location for this folder by using the Log File Path setting at the top of the Dr. Watson dialog box. In addition to the log files, Dr. Watson is capable of creating a binary dump file that a programmer can load into a software debugger program in order to troubleshoot the error. Activate this option by checking the Create Crash Dump File check box in the Options section of the Dr. Watson dialog box. As with the log files, you can indicate a different default path for the crash dump file by entering it into the Crash Dump line near the top of the Dr. Watson screen. The Number of Instructions entry tells Dr. Watson how many instructions it should disassemble before and after the program counter for each thread state dump. (A program counter is a register that holds the memory location for a thread's point of execution.) The Number of Errors to Save entry sets a limit on the number of errors Dr. Watson will save in a log file. In the Options section of the Dr. Watson dialog box, there are six variables that you can check or uncheck to switch on or off. Dump Symbol Table configures Dr. Watson to include the symbol table for each software module. Activating this option can cause your dump files to become very large. Activating Dump all Thread Contexts will cause Dr. Watson to log a state dump for every thread in the program that is crashing. If this option is left unchecked, Dr. Watson will only create a state dump for the thread that is causing the error in the program. The Append to Existing Log File option decides whether Dr. Watson should add error data to the end of the existing DRWTSN32.LOG file, or if it should create a new log file for each program error. If you check this option, you should monitor the size of the DRWTSN32.LOG file, as it can grow to a cumbersome size. You can check the Visual Notification and Sound Notification options if you want to receive visual or audible cues when Dr. Watson detects a program error. Finally, there is the Create Crash Dump File option that I mentioned earlier in this section. Unless you are a software programmer, the log and dump files created by Dr. Watson will be of limited personal use. However, these files can be sent to a Microsoft support specialist or to the creator of the software that is experiencing errors. Usually, a programmer will use the information in these files to determine the exact point in the program's lines of code where the error is taking place, and examine the specific variables in the code that might be responsible for causing the problem. Program Compatibility WizardThe Program Compatibility Wizard, which is also discussed in Chapter 9, "Windows Commands and Scripting," is used as a workaround for compatibility issues with a program that was released for an earlier version of Windows that has trouble functioning under Windows XP. The Program Compatibility Wizard can be launched from the Start menu by choosing All Programs, Accessories. Alternatively, you can right-click on a program's launch file or shortcut, select Properties, and then click on the Compatibility tab. You can choose to run a program in one of the following Windows compatibility modes for Windows 95, 98, Me, NT4.0 (SP5), and 2000. The Program Compatibility Wizard also offers three display options for older programs:
Tip If you are running an application in a Windows Compatibility mode, you should close any active antivirus and antispyware programs. These programs can cause problems when running an application in Windows Compatibility mode. System Configuration UtilityThe System Configuration Utility is a powerful troubleshooting tool that allows you to configure a number of Windows startup variables (see Figure 12.10). To access the System Configuration Utility from the Start menu, select Run, and enter MSCONFIG . Figure 12.10. Using the Microsoft System Configuration Utility to manually set startup variables.From the General tab, you can choose to alter the startup method that Windows will use the next time you reboot the machine. Diagnostic Startup is essentially the same as Safe mode; you can further configure this option by selecting which services you want to start by clicking on the Services tab. Selective Startup allows you to further customize startup on a more granular level. The SYSTEM.INI and WIN.INI tabs contain services and programs that are primarily meant to provide backwards compatibility for programs designed for earlier versions of Windows. The SYSTEM.INI and WIN.INI files are not necessary to run Windows XP, but may be required by older drivers and programs. The BOOT.INI tab gives you convenient access to the BOOT.INI file. This file normally contains information on any other operating systems installed on the computer. You can also use the BOOT.INI tab to add certain switches to the Windows startup process. These switches are
At the bottom of the Boot Options section of the BOOT.INI tab is a button labeled Advanced Options. There are four additional switches that can be added to the Windows startup process via this button:
The Services tab can be used to enable or disable specific services. This can be very useful if you are troubleshooting a Windows startup problem, and want to disable services without uninstalling the associated software. You can view only the third-party services in the list by clicking on the Hide All Microsoft Services check box. The Startup tab allows you to enable or disable software programs that are started when Windows is started. Common examples of such programs include antivirus software, instant message clients , and third-party control panels for display adapters and audio cards. Again, disabling all unnecessary programs and enabling them one at a time can help to isolate and identify the cause of a Windows startup problem. If you would like to know what some of the more cryptically named startup items are, you can try looking them up at www.sysinfo.org. Windows TroubleshootersWindows Troubleshooters are mini-programs that are used to troubleshoot a minor problem with normal Windows operations. The Windows Troubleshooters are similar in design and function to expert systems. An expert system is a software program that contains knowledge gathered from one or more human experts. When the program is run, it asks a series of questions to collect information from the user, and then uses this information in concert with its internal knowledge to diagnose a problem or analyze a given situation. An expert system possesses an internal logic structure that enables it to follow a deductive process much like someone who is troubleshooting a Windows problem. Windows XP will offer to open a Windows Troubleshooter when you encounter certain specific problems. However, you can always access the full list of Troubleshooters by selecting the Help and Support option from the Start menu. In the Help and Support Center, type List of Troubleshooters into the Search box located in the topleft corner of the screen, and press Enter. In the Search Results box, click on the List of Troubleshooters link that appears. Table 12.2 lists all of the Windows Troubleshooters and what each one should be used for. Table 12.2. Windows Troubleshooters
Note There is a fair amount of crossover between the various Windows Troubleshooters in terms of what subject area each Troubleshooter covers. You should always try to use the Troubleshooter that is most specific for the problem you are working on. For example, if you are dealing with a malfunctioning modem, you should choose the Modem Troubleshooter over the Hardware Troubleshooter, as the first troubleshooter is more relevant to the issue. With certain Windows Troubleshooters, you may be asked to restart the computer or to exit out of the Troubleshooter before completing a step. Because of this, it is recommended that you manually track your progress through the Troubleshooter on a piece of paper, making a note of the questions asked and your responses to each question. By doing this, you can restart the Troubleshooter after closing it, and get back to where you were. Installing Additional Windows Support ToolsAs you have seen, there are a number of troubleshooting tools and resources available in a normal Windows XP installation. However, Microsoft has also provided a large collection of additional programs known as the Windows Support Tools. These tools are meant for use by Microsoft support specialists and experienced Windows users to help diagnose and solve Windows issues. The Windows Support Tools are not installed by default when you install Windows XP, but they can be installed at a later time from the Windows XP installation CD. To install Windows Support Tools, place the Windows XP installation CD into your system while Windows is running. Open the contents of the CD in My Computer or Windows Explorer and browse to the Support\Tools folder. Double-click the SETUP.EXE file to install the Windows Support Tools. Note If you are running Windows XP Service Pack 2, you should not install the Windows Support Tools from the Windows XP installation disk. Microsoft has an updated version of this package, Windows XP Service Pack 2 Support Tools , available as a free download on its website. To download this newer version, visit http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38&displaylang=en. There are nearly fifty different command-line programs available in the Windows Support Tools. Thankfully, a help file that describes each tool in depth is placed in the Windows Support Tools item created in the Start menu after installation. Each entry in the help file includes an overview of the support tool, notes on how to use the tool from the command line, the syntax you should use when typing the command as well as all of the available switches, one or more examples of the tool's functionality, and a list of related support tools that may be applicable to the issue you are troubleshooting. Here are some examples of the types of tools included in the Windows Support Tools:
|