Reputation: 9947
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?
Upvotes: 4
Views: 6951
Reputation: 4849
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
Upvotes: 1
Reputation: 19654
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.
Upvotes: 9
Reputation: 28499
I've had to solve this problem before. I believe you actually have to get the File Version information of the associated driver file.
Upvotes: 0