portable executable - windowspe - find devices whitout proper driver -


i'm trying automate installation of drivers windows pe. after booting pe , looking devices such output:

devcon status *pci* pci\ven_8086&dev_0c05&subsys_11f41734&rev_06\3&11583659&0&09     name: pci standard pci-to-pci bridge     driver running. pci\ven_19a2&dev_0800&subsys_11cc1734&rev_00\4&313340f4&0&01e0     name: coprocessor     device has following problem: 28 

now, i'm interested in devices error/problem.

how can figure out devices affected?

i tried findstr:

devcon status *pci* | findstr /n /i "pci\\ name problem" 

but devices, not faulty ones.

the easiest way seems use file

devcon status *pci* > devcon.txt findstr /n /i "problem" devcon.txt 

with line numbers. how can read line 2 lines above line containing "problem"?

so, after 1 day of research can answer myself question ;)

the easyiest way solve problem linux grep (from cygwin64)

i´ve installed cygwin , copied files pe

  • grep.exe
  • cygiconv-2.dll
  • cygintl-8.dll
  • cygpcre-1.dll
  • cygwin1.dll

my commandline looks this

devcon status *pci * | grep -b2 -i -e problem -e stopped > errors.txt

probably can shorten command, i´m happy thats working.

netlord


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -