如果记忆对我有帮助,请更正安装驱动程序期间使用的 *.inf 转换为 Windows 的驱动程序存储区,即 oem[0-9]{1,3}.inf 文件,您会在输出中看到该文件。我刚刚使用 devcon 程序找到了我的视频卡 hwid,然后再次使用 devcon 列出了驱动程序文件。
在输出中,您会注意到对 System32/DriverStore 的路径引用。这实际上包含安装期间使用的原始 *.inf 文件。:) 它的 1:1 只是将 nv_disp.inf 与我的 oem#.inf 区分开来。与我在 wmi 和其他方面的经验不同,Devcon 确实为您提供了完整的驱动程序文件列表。
这是我谈论的参考 C:\Windows\System32\DriverStore\FileRepository\nv_disp.inf_amd64_neutral_671aa18aef114cc2\
所以它很简单!抓住你的 HWID | devcon 驱动程序文件 | 清理结果,添加一点点逻辑 | tar old-driver.tar filelist.txt
使用这些备份恢复或做一些有用的事情将是非常不同的事情。每次更新驱动程序时,它都会添加一个新的驱动程序存储文件夹,找出哪个是最新的一点也不难。所以理论上你不需要通过获取一些文件夹统计数据并备份正确的数据来做任何事情。您也可以使用 PnPutil 循环并尝试删除所有 oem*.inf 驱动程序包,它无法删除活动包,因此风险很小,但它可能会稍微清理驱动程序存储。
您可能还对我在 github 上提供的 Geforce Driver Check 脚本感兴趣。
您将需要下载他们的 500meg 驱动程序开发工具包 ISO 并提取 + 重命名两个 devcon 二进制文件(我认为是 devconx64.exe 和 devcon.exe)Devcon 可以执行“设备管理器 GUI”可以从 CMD 行执行的所有操作。
$ devcon driverfiles PCI\\VEN_10DE\&DEV_1184
PCI\VEN_10DE&DEV_1184&SUBSYS_37743842&REV_A1\4&2F1C4782&0&0018
Name: NVIDIA GeForce GTX 770
Driver installed from C:\Windows\INF\oem8.inf [Section090]. 53 file(s) used by driver:
C:\Program Files\NVIDIA Corporation\Drs\dbInstaller.exe
C:\Program Files\NVIDIA Corporation\Drs\nvdrsdb.bin
C:\Windows\System32\DriverStore\FileRepository\nv_disp.inf_amd64_neutral_671aa18aef114cc2\NvCplSetupEng.exe
C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\Nvd3d9wrap.dll
C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\detoured.dll
C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\nvdxgiwrap.dll
C:\Program Files\NVIDIA Corporation\coprocmanager\Nvd3d9wrapx.dll
C:\Program Files\NVIDIA Corporation\coprocmanager\detoured.dll
C:\Program Files\NVIDIA Corporation\coprocmanager\nvdxgiwrapx.dll
C:\Program Files\NVIDIA Corporation\license.txt
C:\Program Files\NVIDIA Corporation\NVSMI\MCU.exe
C:\Program Files\NVIDIA Corporation\NVSMI\nvdebugdump.exe
C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.1.pdf
C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe
C:\Program Files\NVIDIA Corporation\NVSMI\nvml.dll
C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL.dll
C:\Program Files\NVIDIA Corporation\OpenCL\OpenCL64.dll
C:\Windows\system32\DRIVERS\nvlddmkm.sys
C:\Windows\system32\NvFBC64.dll
C:\Windows\system32\NvIFR64.dll
C:\Windows\system32\NvIFROpenGL.dll
C:\Windows\system32\nvEncodeAPI64.dll
C:\Windows\system32\nvapi64.dll
C:\Windows\system32\nvcompiler.dll
C:\Windows\system32\nvcuda.dll
C:\Windows\system32\nvcuvenc.dll
C:\Windows\system32\nvcuvid.dll
C:\Windows\system32\nvd3dumx.dll
C:\Windows\system32\nvinfo.pb
C:\Windows\system32\nvinitx.dll
C:\Windows\system32\nvoglshim64.dll
C:\Windows\system32\nvoglv64.dll
C:\Windows\system32\nvopencl.dll
C:\Windows\system32\nvumdshimx.dll
C:\Windows\system32\nvwgf2umx.dll
C:\Windows\SysWow64\NvFBC.dll
C:\Windows\SysWow64\NvIFR.dll
C:\Windows\SysWow64\NvIFROpenGL.dll
C:\Windows\SysWow64\nvEncodeAPI.dll
C:\Windows\SysWow64\nvapi.dll
C:\Windows\SysWow64\nvcompiler.dll
C:\Windows\SysWow64\nvcuda.dll
C:\Windows\SysWow64\nvcuvenc.dll
C:\Windows\SysWow64\nvcuvid.dll
C:\Windows\SysWow64\nvd3dum.dll
C:\Windows\SysWow64\nvinit.dll
C:\Windows\SysWow64\nvoglshim32.dll
C:\Windows\SysWow64\nvoglv32.dll
C:\Windows\SysWow64\nvopencl.dll
C:\Windows\SysWow64\nvumdshim.dll
C:\Windows\SysWow64\nvwgf2um.dll
C:\Windows\system32\nvdispco6433193.dll
C:\Windows\system32\nvdispgenco6433193.dll
1 matching device(s) found.
Device Console Help:
devcon.exe [-r] [-m:\\<machine>] <command> [<arg>...]
-r Reboots the system only when a restart or reboot is required.
<machine> Specifies a remote computer.
<command> Specifies a Devcon command (see command list below).
<arg>... One or more arguments that modify a command.
For help with a specific command, type: devcon.exe help <command>
classfilter Add, delete, and reorder class filters.
classes List all device setup classes.
disable Disable devices.
driverfiles List installed driver files for devices.
drivernodes List driver nodes of devices.
enable Enable devices.
find Find devices.
findall Find devices, including those that are not currently attached.
help Display Devcon help.
hwids List hardware IDs of devices.
install Install a device manually.
listclass List all devices in a setup class.
reboot Reboot the local computer.
remove Remove devices.
rescan Scan for new hardware.
resources List hardware resources for devices.
restart Restart devices.
sethwid Modify Hardware ID's of listed root-enumerated devices.
stack List expected driver stack for devices.
status List running status of devices.
update Update a device manually.
updateni Manually update a device (non interactive).
dp_add Adds (installs) a third-party (OEM) driver package.
dp_delete Deletes a third-party (OEM) driver package.
dp_enum Lists the third-party (OEM) driver packages installed on this machine.