How to make USB lower filter driver optional

Hi, I developed a lower filter USB driver to monitor plugged devices. It works fine, but a few days ago I had an unpleasant situation occurred. Due to a power outage, the computer restarted, and as a result, the registry configuration switched to LastKnownGood. My driver with a test signature (previous version) was listed there (at that time, I was testing it with the TESTSIGNMODE option enabled, but later I disabled it), and as a result, it didn't load, obviously due to the test signature. Consequently, all USB devices stopped working. I understand that this is a somewhat artificial situation. However, I'd like to know if it's possible to make the system continue to function as normal without my lower filter driver if it fails to load?

You could go into safe mode and remove your filter from the registry. Otherwise, nope.

Thank you for your answer! Maybe I didn't phrase the question precisely – what I specifically wanted to know is whether it's possible to instruct the system to ignore filter driver loading errors? For example, like with minifilters: if the driver doesn't load, the system continues to operate without it and everything works fine.

Yeah that was the 'otherwise no'. Minifilters have their own framework for load/unload outside of pnp.

1 Like

I got it. Thank you for answer!