Author Posts

June 25, 2015 at 3:46 pm

Is there a way to list all of the files with their path associated with the driver.

For instance, Intel Graphics driver has many files associate with it. (Screen Shot of Device Manager listing all of the files of Intel Graphics driver.)

The code I am using is:

# Export all driver names to a text file
Get-WmiObject win32_SystemDriver | select name | foreach {$_.name} | Out-File C:\driverName.csv

# Read driver name from file.
$driver =  Get-Content "C:\driverName.csv"

# Get the file path of the driver
$path = (Get-WmiObject win32_SystemDriver | Where-Object name -match $driverName).PathName

# Extract information from the file path and export it to CSV
(Get-Item $path).VersionInfo  | Select FileDescription, ProductVersion, FileVersion, FileName | Export-Csv -Path C:\FileVersion.csv

It only lists one main .sys file.

While researching, I found out that...

get-wmiobject -class "Win32_PrinterDriver" -namespace "root\CIMV2" -computername $Server

Win32_PrinterDriver class has extra set of properties like DataFile, ConfigFile, DependentFile and etc.

However, it only lists printer drivers.
Is there a way to list all of the driver or possibly a different class that would list other files as well?

June 29, 2015 at 7:53 am

Thank you, Rob. Yes, I looked into it, and it seems like it just outputs .sys file associated with the driver.
I am trying to list all of the files associated with the driver (i.e. .inf, .dll and etc).

June 29, 2015 at 10:12 am

There doesn't seem to be a WMI based way to get this

June 30, 2015 at 2:47 pm

I was able to list all of the drivers using DevCon utility.

devcon.exe driverfiles * > file.txt