Hello, I’m developing a driver for win7 via WDM.
When the device is coming, OS will add the Hardware key in the registry.
Since I want the device shows it’s friendly name in device manager, I add
“FriendlyName” Key in Hardware key during AddDevice.
Registry:
HKML\SYSTME\CurrentControlSet\Enum\USB\VID_XXX\HardwareKey1\FriendlyName:“MyPlayer”
The problem is, the Hardware key won’t be deleted every time when device is
removed.
So, when the device is connected again, there will be two device has the
name “MyPlayer”.
HKML\SYSTME\CurrentControlSet\Enum\USB\VID_XXX\HardwareKey1\FriendlyName:“MyPlayer”
HKML\SYSTME\CurrentControlSet\Enum\USB\VID_XXX\HardwareKey2\FriendlyName:“MyPlayer”
And in device manager, the name of my device is “2-MyPlayer” instead of
“MyPlayer”.
Is there anyway I can get around this problem?
Thanks!
–
Danny