3

On Windows, how can my user-mode program get the driver version number(s) for the video card(s) installed?

Programs like ATI's "Catalyst Control Center" can display this information to the user or include it automatically into bug reports. How do they get it?

I've been looking thru the PSDK documentation, and I can't find anything relevant.

Can a user program walk thru the database that Device Manager displays?
Is there an IOCTL call like getting disk drive geometry?
Is it in a (reliable) registry key?

3 Answers 3

7

In PowerShell:

Get-WmiObject Win32_VideoController | format-table Name, Description,VideoProcessor,DriverVersion

The WMI objects are also available from any language that speaks COM or .Net.

ETA: You may wish to exclude records without a value for VideoProcessor, like the Live Mesh drivers. I did that by including |where {$_.VideoProcessor -ne $null } in the pipeline before the format command.

1
  • Thanks, JasonTrue. Given that starting point, I've figured out how to do this in C++. Jan 12, 2009 at 2:22
1

I used "dxdiag /x output.xml", then get the video driver version by parsing "output.xml". dxdiag is slow, but it tells the one correct driver version..

I used python to do this job. Inspired by Jason's answer, I get the following code:

>>> import wmi
>>> c = wmi.WMI()
>>> for device in c.Win32_VideoController():
    if device.VideoProcessor:
        print device.DriverVersion
0

I've had to solve this problem before. I believe you actually have to get the File Version information of the associated driver file.

1
  • 1
    But how do you identify the driver file? Jan 2, 2009 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.