문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top