Sometimes the installation finishs without an error message, but the monitor is not registered correctly. No entry can be found in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors and mfilemon can't be used, also the DLLs are installed correctly in system32 folder.
Restarting the printer spooler, deleting the DLLs from system32 and reinstallation of mfilemon solved the problem, so maybe there is a lock on the printer spooler making it impossible to register the monitor.
Attached is a patch for the Inno setup installer which solved the problem. If the DLLs are already available at system32, the installer checks if the monitor has been registered and if not trys to do a registration call. Additionally the deregstrtation call is repeated in case of uninstallation if the the first deregistration call fails. The printer spooler is restarted before the second call.
Thank you very much for your fix.
It has been merged to SVN [r37].
I only slightly modified the changes to regmon.cpp, providing a more accurate error reporting in ListRegisteredMonitors().
Cheers - Lorenzo -
Related
Commit: [r37]