D
Deleted member 1890170
Guest
Microsoft stated here, the subkeys under HKLM\Drivers\USB\LoadClients for each USB driver have the form Group1_ID\Group2_ID\Group3_ID\DriverName. Each of the group identifier subkeys can be named Default to indicate that the USB device driver should be loaded if the remaining group identifier subkey names match the USB device. Otherwise, the group identifier subkey names are formed from combinations of vendor, device class, and protocol information, separated by underscores. This information comes from the USB device descriptor
You thanksfully demonstrated, the usb host drivers have variable length group ID entries, ex. "4817_4097","2800_26993_0","1133_49243_21504", and so on.
For me it seems to be unpossible to write a "generic" script, because you simply - at first glance - don't know which type of Group_ID the usb host driver sentence belongs to, means how to interpret the Group_ID sentence retrieved from registry.
If it's always Group_ID 1, then in any case is valid:
1. read in the Group_ID sentence
2. ignore all after 1st backslash, if any present
3. split the Group_ID got at the underscore
4. the 1st element then is the vender ID, the 2nd element then is the product ID
You thanksfully demonstrated, the usb host drivers have variable length group ID entries, ex. "4817_4097","2800_26993_0","1133_49243_21504", and so on.
For me it seems to be unpossible to write a "generic" script, because you simply - at first glance - don't know which type of Group_ID the usb host driver sentence belongs to, means how to interpret the Group_ID sentence retrieved from registry.
If it's always Group_ID 1, then in any case is valid:
1. read in the Group_ID sentence
Code:
old_usb_driver=""
ForEach usb_driver In RegSubKeys("HKLM","Drivers\USB\LoadClients")
Code:
bs=Find(usb_driver,"\")
If(bs)
usb_driver=SubStr(usb_driver,1,(bs-1))
EndIf
Code:
vid_pid=Split(usb_driver,"_")
Code:
vid=vid_pid[1]
pid=vid_pid[2]
Last edited by a moderator: