Process Monitor – Unload Driver Without Restarting

driversprocess-monitor

I sometimes use Process Monitor for debugging software, and also play games online. Some of these games use BattlEye anti-cheat software, which refuses to allow the game to run after Process Monitor has been started on the system, showing this in the log:

08:06:46: Starting BattlEye Service...

08:06:49: Launching game...
08:07:07: Disallowed driver: "\??\C:\Windows\system32\Drivers\PROCMON23.SYS". Please unload it or reboot your system.

The driver remains loaded after closing Process Monitor, and there doesn't appear to be an option to have it unload.

Several other questions have answers about unloading drivers using net stop or sc stop, but the ProcMon driver isn't a service, so this doesn't work. I've also tried looking in Device Manager and enabling 'Show hidden devices', but none of the entries appear related to ProcMon. I can't delete the driver file, as it's not actually present on the filesystem; ProcMon stores the file in its executable and extracts it as needed.

My question is not a duplicate of this question, which is about a similar issue where the driver persists after a reboot. My question is about unloading the driver without rebooting.

Best Answer

Standard drivers are services and you can indeed control them via net and sc. (For example, take a look at sc query beep – stopping the 'beep' driver is a common way to shut up the internal PC speaker.)

In earlier Process Monitor versions (probably pre-2.3, when it still had Windows XP support), it would install a "legacy" device driver that was visible via sc, Device Manager, etc.


Current versions of Process Monitor appear to remove the driver/service configuration from registry immediately after starting the driver. You can see this by monitoring ProcMon with itself. It is possible to manually re-add the service, with type 2 (kernel FS driver) and it will immediately show up as already running.

However, the service will also report "NOT_STOPPABLE" and will refuse any stop attempts.

Additionally, PROCMON23 now registers itself as a filesystem minifilter driver through the Filter Manager (FltDrv). You can see it in the output of fltmc, but attempting to externally unload it also fails (possibly because the driver doesn't have the unload routine):

C:\WINDOWS\system32>fltmc

Filter Name                     Num Instances    Altitude    Frame
------------------------------  -------------  ------------  -----
PROCMON23                               0       385200         0
WdFilter                                4       328010         0
storqosflt                              0       244000         0
wcifs                                   1       189900         0
...

C:\WINDOWS\system32>fltmc unload PROCMON23

Unload failed with error: 0x801f0010
Do not detach the filter from the volume at this time.

Since the "official" CLI tool is unable to remove the filter from FltMgr, and FltMgr itself is a 'critical' driver that cannot be restarted without reboot, it would seem that there's no way to unload PROCMON23 or PROCMON24.


But the most interesting part: After doing the above checks with procmon 3.40, I found that the latest version on the website is 3.50 (which uses a newer PROCMON24 driver). Upon starting the new version, I was informed that an older version of the driver was already on the system and that I should reboot.

So if ProcMon itself cannot unload its own driver without requiring a reboot, I think you can safely assume that you won't be able to unload it either.

Related Question