익명 00:59

Enumerating drivers on local Windows machine

Enumerating drivers on local Windows machine

I would like to enumerate what drivers have been installed on my Windows machine. So far, I have come across three ways of doing this.

  1. Using the driverquery command: driverquery

  2. Using the Get-WindowsDriver commandlet: Get-WindowsDriver -Online -All

  3. Using autorunsc.exe from SysInternalsSuite: autorunsc.exe -a s

However, all three seem to give different outputs. From what I understand, autoruns only gives me the drivers that have been enabled (and autostart services), while driverquery gives me both enabled and disabled drivers. However, Get-WindowsDriver seems to give me way more drivers, and the file paths seem to lead to .inf files instead of .sys files. I have come across this link to try to better understand the difference: https://learn.microsoft.com/en-us/windows-hardware/drivers/install/components-of-a-driver-package, but intuitively it would seem to me that there should be at least as many .sys files as .inf files since each driver package has one .inf file and one .sys file at minimum. I would like to know where is the gap in my understanding of this issue.



Top Answer/Comment:

Comment: I would create a directory name DriverExport in the root directory of your sytem drive, then run dism /online /export-driver /destination:C:\DriverExport as an Administrator, if you want to reinstall the drivers you would simply run pnputil /add-driver C:\DriverExport\*.inf /subdirs /install. What are you trying to do by doing this driver enumeration?

상단 광고의 [X] 버튼을 누르면 내용이 보입니다