I got a setup project that installs a windows service.
We are registering a event log source in a custom log which should be used by the winservice project (how and why is not important).
My problem is that the setup project tries to create an event log source per default. By doing so it get's an error message ("Error 1001" source XXX already exists on local computer
) and rolls back.
I have looked everywhere and I cannot find where the registration is done or how I can turn it off.
How can I force the windows service or setup project to NOT create an event log source?
You can remove the default
EventLogInstaller
:Alternatively, you can modify the
Log
property:Now events will be successfully logged to MyLog, and service start/stop events will still be logged to the Application log.
(source: serviceInstaller component and its default EventLogInstaller)