Hi
Is there anyone good at datamining here?
just look at an INF in a folder.
It will probably have sections with hwids for all the Operating systems it supports.
I mean, they are from one file, and one can have three dupes from this single INF.
a query which removes those, that would be handy.
After removing dupe hwids we got from a single INF, we can still find dupe hwids found in OTHER infs IN SAME driver folder. They interest you.
Probably for separate OS, but also happens for different mode of a chip (ahci/raid)
Dupe Mass storage HWIDs from other drivers, those are possible cause for conflict.
The first CSV I made was from chipset (which currently has three sets of same files.) and mass storage.
Is there anyone who can help on this?
----------------------
I NEEDED to put a further REFINEMENT in there..
[0-9A-Za-z&_]
I looked at output, and some entries were 'truncated'
An Nvidia driver contains this line
%PCI\VEN_10de&DEV_01b4.DeviceDesc% = NO_DRV, PCI\VEN_10de&DEV_01b4
and that became
PCI\VEN_10,c:,d,D,C,N,nfsmb64.inf
it took me a while to find that A-Z was case sensitive..
Now it is good for mining.
I'll not use code tags, because that makes the batch read all wrong ...
I read that delims= defaults to space TAB, so you do not have to add a space and tab..
(yep, I tried it.)
Here is the batch as it is now, it works for me.
;-----------------------------------------------------
@ECHO off
Echo Create CSV listings from INF files from extracted Drivers
echo.
echo drag folder containing driverfolder from Windows Explorer into this Dos-box
echo (or, Type a valid path to the folder ie C:\DriverPacks\extracts.)
set /P DPS_INF=
if not exist %DPS_INF% goto nonvalid
cls
Echo on
::cleanup
del raw-dump*.csv 2>&1>nul
FOR /F "delims=" %%f in ('dir /b /s "%DPS_INF%\D\*.inf"') DO (
FOR /F "delims=" %%l in ('type "%%f" ^| sed -n "/PCI\\\VEN/p" ^| sed "s/.*\(PCI\\\VEN_[0-9A-Za-z&_]*\).*/\1/g"') DO (
echo %%l,%%f >> "raw-dump.csv"
)
)
::filter out path slashes
type "raw-dump.csv" | sed "s/PCI\\VEN/PCI_VEN/g" | sed "s/\\/,/g" | sed "s/PCI_VEN/PCI\\VEN/g"> "raw-dump-filtered.csv"
::sort file
sort "raw-dump-filtered.csv" /o "raw-dump-filtered-sorted.csv"
::remove duped lines
type "raw-dump-filtered-sorted.csv" | sed "$!N; /^\(.*\)\n\1$/!P; D" >> "raw-dump-filtered-sorted-nodupes.csv"
;-----------------------------