When you're troubleshooting a problem that you suspect is related to a device driver, you can find detailed information about any specific driver being used in a system by going to Device Manager, selecting the device from the list, and drilling down through the properties sheet. This technique is fine when you're looking for information on one device driver, but it's not very efficient when you're interested in information about a number of device drivers—it’s just too time-consuming.
To make gathering information on multiple device drivers easier, Microsoft added a new command-line tool to Windows XP Pro—Driver Query (Driverquery.exe). Driver Query gives you a detailed list of all the device drivers installed on a local system or on any system on a network. Unfortunately, Driver Query is run from the Command Prompt window, which isn’t the most convenient place to work. To make Driver Query easier to use, I've created an HTML Application (HTA) that uses Windows Script Host and VBScript to give this tool a GUI front end you can download. I'll introduce you to Driver Query and explain how it works. Then, I'll show you how to use the Driver Query tool HTA.
The Driver Query on the command line
The Driver Query command-line tool is designed to give you detailed information about all the device drivers installed in a Windows XP Pro system. It can be run across a network to gather the same information from remote XP Pro systems.
You’ll most likely use this tool for troubleshooting scenarios in which you suspect that an errant device driver is the cause of the problem. You can use its report for a before and after comparison. Of course, this means that you have to run the tool when your system is working properly and then save the report to a file. Then, if the system exhibits problems that could be the result of missing or corrupt drivers after installing a new device, you can run the tool again, save the second report, and compare the two reports to pinpoint anything that has changed.
The Driver Query command-line tool gives you several parameters that allow you to alter its default operation. For example, you can configure the tool to use a verbose mode, which gives you additional details about the drivers, or you can configure the tool to give you detailed digital signature information about both signed and unsigned device drivers.
By default, the Driver Query command-line tool displays its report using a table format. You can configure the tool to display the report in a top-to-bottom list format or as a CSV (Comma Separated Values) file format that you can then open in a spreadsheet.
Installing the Driver Query tool
One of the nicest features of creating a tool as an HTA is that it requires fewer files than some of the other scripting methods. The Driver Query tool requires just two files—the main HTA file and an ICO file, which the HTA uses for the control menu and the taskbar icons.
After you download the Driver Query tool self-extracting installation package, DQT Setup.exe, just run the executable file. The installation program will prompt you to choose a folder in which to install the application. If the folder doesn’t exist, the installation program will create it for you.
Using the Driver Query tool application
After you install the Driver Query tool application, double-click the HTA file to launch it. You’ll see the main screen, as shown in Figure A.
|The Driver Query tool displays all of its features in a single dialog-box-like window.|
As you can see, the features provided via the HTA environment allow you to use Internet Explorer to create a visually appealing interface that's easy on the eyes. The other plus is that the interface looks more like a standard application than just a form displayed in Internet Explorer. If you need assistance with the Driver Query tool, click the Help button to display the Driver Query Tool Help screen, shown in Figure B.
By default, the Driver Query tool will run on the local Windows XP Pro system. If you select the Remote System radio button, you can run the command on a remote XP Pro system across a network. When you select the Remote System radio button, the adjacent text box becomes active and you can specify the remote system using either the remote system's NetBIOS name or its IP address. If you use the NetBIOS name, do not precede the name with backslashes as you would when using the UNC format—just type the name.
When you choose a remote XP system, the check boxes in the Configure Remote Connection section become active and you can then specify account permissions. You can specify just an account name or you can specify the domain and the account name using the format Domain\User. You can then also specify a password. If you don’t specify an account or a password, Driver Query will use the permissions of the current user on the local system.
If you want to display additional information in your report, you can select either of the check boxes in the Report Options section. Keep in mind that the two options in this section are mutually exclusive. When you select one check box, the other is automatically disabled.
By default, the Driver Query tool will create the report using the Table format. It will then save it as a .doc file in the same folder in which you installed the application. The Driver Query tool will then open the file using the application you have associated with the .doc extension. For example, Figure C shows the default report displayed in WordPad.
|If WordPad is associated with the .doc extension, the default report will be displayed in it.|
If you select the check box in the Report Formats section, you can then choose one of the other two supported formats. Choosing the List format will display the report in Notepad. Choosing the Spreadsheet format will create a CSV file and display the report in your default spreadsheet application. (Regardless of the format you choose, the filename of the report will be DriverQuery-mm-dd-yyyy, along with the appropriate extension.)
When you click OK, the Driver Query tool will shell out to a Command Prompt, run the Driverquery.exe command, and save the results to a file in the selected format. It will then prompt you to view the report. If you select Yes, the Driver Query tool will close and then display the report in the appropriate application. If you select No, the Driver Query tool will simply close.
For more new command-line utilities, check this out
Windows XP has more new command-line utilities, and Microsoft has an entire Web site dedicated to explaining what’s included with the new operating system. Click on the new command and you’ll find information on what the command does, proper syntax, special parameters, and a few examples.
Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.