我正在尝试使用 Windows PE 自动安装驱动程序。启动 PE 并查找设备后,我得到这样的输出:
devcon status *pci*
PCI\VEN_8086&DEV_0C05&SUBSYS_11F41734&REV_06\3&11583659&0&09
Name: PCI standard PCI-to-PCI bridge
Driver is running.
PCI\VEN_19A2&DEV_0800&SUBSYS_11CC1734&REV_00\4&313340F4&0&01E0
Name: Coprocessor
The device has the following problem: 28
现在,我只对有错误/问题的设备感兴趣。
如何确定哪些设备受到影响?
我用 findstr 试过了:
devcon status *pci* | findstr /n /i "pci\\ name problem"
但我总是得到所有设备,而不仅仅是有故障的设备。
最简单的方法似乎是使用文件
devcon status *pci* > devcon.txt
findstr /n /i "problem" devcon.txt
有了这个,我得到了行号。但是我现在如何阅读包含“问题”的行上方的第 2 行?