I'm doing a bit of driver programming and I have a PNP driver for a pseudo-device that has it's own custom device setup class. The driver is a pseudo-bus enumerator and creates pseudo devices, not unlike the toaster example.
Anyways, I have a whole lot of old, unneeded entries in HKLM\SYSTEM\CurrentControlSet\Enum
now. Is there some nice utility for removing old device enumerations in there? I don't seem to be able to do it with devcon
or pnputil
. I can delete it manually, but that's really tedious given that only SYSTEM
has full control privileges over much of what's in Enum
.
The reason that devcon remove
isn't working is because devcon hardcodes the DIGCF_PRESENT
flag, and your old unneeded devices are not currently present. As the devcon source code is publicly available, you can compile your own version that removes the flag.
Hint: start looking in the cmdRemove
function.