EventLogInstaller x ServiceInstaller (error trying to register service to another log, different from Application)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello,

I'm using ServiceInstaller and ServiceProcessInstaller classes in order to install a Windows Service Application (a NT Service), in order to custom the user.

I also tried to use EventLogInstaller in order to post events to a custom log (other than application). When installutil runs, it gets an exception : "Source MyServiceName already exists on the local computer", where MyServiceName is the ServiceBase.ServiceName used.

ServiceName is registered twice : by my EventLogInstaller and by ServiceInstaller, which automatically creates an EventLogInstaller for registering the ServiceBase.ServiceName as Source, and "Application" as the Log.

Is it possible to overrule or suppress this procedure in order to make the service send events elsewhere than in Application's log ??

Thank you in advance.
--------------------------------
From: Adriano Nascimento

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>0THwRpKs8UWYMUem5U3UZg==</Id>
.