有什么办法或教程在那里我可以:列表驱动程序相关的文件和它们的版本
- 列出所有相关的驱动程序
- 这些文件的列表文件版本的文件的文件(.exe,.dll文件,.sys等)
我想编译所有安装在计算机中的驱动程序的列表,并主要列出所有与驱动程序有关的文件(exe,sys,dll等)以及文件版本。请看附图。
我试图用的WMI对象(PowerShell的)和开发者大会工具,但可以得到上市的那些文件。
使用Powershell,我可以列出驱动程序名称,但只有文件出现。
# Script to output all of the drivers installed in the computer
# 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
谢谢!但我试图列出与驱动程序相关的所有文件。 – Imsa
好吧,我想你将不得不使用devcon并使用正则表达式解析其输出,这将需要做一些事情。或者将所有驱动程序导出到临时文件夹,然后进入该文件夹并列出每个驱动程序及其使用的文件 – Kiran
如何将所有安装的驱动程序及其文件一起导出/备份到文件夹? 谢谢! – Imsa