Restarting the driver

Hello.

Tell me, for what reasons can the driver be restarted?

There is an OS filter driver that is periodically run twice (not on all computers). The previous driver works, when new instance start. I added logs, I see that the “wmiprvse.exe” process starts it. The computer does not enter sleep mode, and external media is not mounted or unmounted.

A filter writer is at complete liberty to write an application to start and stop their filter.

A quick google says that WMI is exactly the sort of filter that would come and go.

But are we not gluing wings on the pig? What’s the problem you are having?

The problem is that more than one instance of the driver is running. For example: OS is starting → driver is loaded → OS working (driver not unloaded it is running) → sometimes new instance is loaded again. I don’t expect this behavior. If it is correct good. But I want to have a chance to prevent loading driver if it was run earlier. How to achieve it?