Use Driver Query to resolve device driver problems

The Driver Query utility may not be perfect, but it can help to compile a device driver usage history.

When the system that has been working flawlessly suddenly starts having problems, the problems can often be traced

to buggy or corrupt device drivers. Although the Windows Device Manager makes it easy to see specific information related to the driver that a particular hardware device is using, the Device Manager isn't always the greatest.

One of the reasons is that the Device Manager does not retain much history information about device drivers. Yes, it does allow you to roll back a device driver to a previous version when problems occur, but it is not capable of showing you every version of a device driver that has ever been installed on the system. Keeping track of device driver history is important because doing so allows you to document which device driver versions work well and which ones are problematic.

Windows XP and Windows Vista contain a command-line tool that you can use for tracking device driver history. The tool is called Driver Query. You can access the Driver Query tool by opening a Command Prompt window and entering the driverquery.exe command. Upon doing so, you'll see a screen similar to the one shown in Figure A.


Figure A: The Driver Query utility displays all of the device drivers that are currently in use.

As you can see in the figure, the Driver Query tool lists some basic information regarding every device driver that is installed on your system. As you look over the list, you will probably notice that there are several important pieces of information that are missing.

The Driver Query tool does not retain any driver version history, and it won't even show you the device driver version.

More on device drivers

DriverView freeware displays manifest of all device drivers.

Universal ATA controller driver serves as alternative to Windows generic driver
.
There are several command-line switches that you can use to make the Driver Query tool more useful. For example, you can use some of these switches to generate an Excel spreadsheet that contains detailed information about the drivers installed on the system. The Driver Query tool is incapable of compiling a driver history report by itself, but you can create your own driver history by periodically generating spreadsheets. By doing so, you will be able to look at the various spreadsheets to see how a system's device drivers were configured on a particular date.

The easiest way of creating a detailed spreadsheet is to use the following command:

DRIVERQUERY /FO:CSV /V >083007.csv

In this command, the /FO switch tells the utility that you want the output formatted. In this case, we are outputting device driver information in CSV format. CSV format is a comma separated value format. CSV files can be opened in Microsoft Excel.

Keep in mind that CSV isn't the only format that the Driver Query tool can produce. You can also format the output as LIST or as TABLE.

The /V switch specifies that you want to produce verbose output. This essentially tells the utility to provide you with as much information about each device driver as possible.

Shortly after the /V switch is a greater-than sign, which tells the command to redirect the output to a file rather than displaying it on the screen. In this case, we are directing the output to a file named 083007.csv. I chose this particular filename because it reflects today's date August 30, 2007. When I open this file in Excel, it actually provides quite a bit of information about each device driver. There is a lot more information that simply won't fit on the screen.


Figure B: The Driver Query tool provides information about each device driver.

The Driver Query tool generates a lot of information when running in verbose mode. Even so, the Driver Query utility still won't give you the driver version. The only way that you can track changes to the driver using this tool is to look at the link date and time column, which is different from the driver version number but serves the same basic purpose.

Another bit of information that is left off of the spreadsheet is any information about whether or not the driver is signed. The Driver Query tool does allow you to look at signature information, just not while running in verbose mode. You can look at the signature information for your device drivers by using the /SI switch. For example, if you wanted to generate a spreadsheet displaying the signature information for your device drivers, you could use the following command:

DRIVERQUERY /FO:CSV /SI?083007.csv

Figure C below shows what this spreadsheet looks like.


Figure C: You can create a spreadsheet that displays the signature information for each device driver.

The Driver Query utility is far from being the be-all, end-all in device driver troubleshooting. But, with a little creativity, you can use this tool to compile a device driver usage history. You can then look back at this history to see what has changed when things go wrong.

About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Windows 2000 Server, Exchange Server and IIS. He has served as CIO for a nationwide chain of hospitals and was once in charge of IT security for Fort Knox. He writes regularly for SearchWinComputing.com and other TechTarget sites.


This was first published in October 2007

Dig deeper on Microsoft Windows XP Pro

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchVirtualDesktop

SearchWindowsServer

SearchExchange

Close