各位大神,遇到个问题,求助~~~
代码如下:
set lanid="PCI\\VEN_10EC&DEV_8168&SUBSYS_88F9103C&REV_16"
单独执行以下语句OK
wmic path Win32_PnPSignedDriver where HardWareID=%lanid% get DriverVersion /value
但放到For语句中提示谓词无效,
for /f "tokens=2 delims==" %n in ('wmic path Win32_PnPSignedDriver where HardWareID=%lanid% get DriverVersion /value ^| find "="') do set new_ver=%n作者: Batcher 时间: 2022-11-12 17:00
非常感谢管理员解答,一直没注意到这些使用比较少的细节问题。
改为以下代码后,问题已解决:
for /f "tokens=2 delims==" %n in ('wmic path Win32_PnPSignedDriver where HardWareID^=%lanid% get DriverVersion /value ^| find "="') do set new_ver=%n