diff --git a/OpenVpnService.csproj b/OpenVpnService.csproj index 1576dee..2687b1f 100644 --- a/OpenVpnService.csproj +++ b/OpenVpnService.csproj @@ -15,7 +15,7 @@ 512 false - 2.0.0.0 + 2.0.1.0 publish\ true Disk diff --git a/Service.cs b/Service.cs index 82567dc..392e6a0 100644 --- a/Service.cs +++ b/Service.cs @@ -28,10 +28,7 @@ public OpenVpnService() this.AutoLog = true; _eventLog = new EventLog(); - if (!EventLog.SourceExists(this.ServiceName)) - { - EventLog.CreateEventSource(this.ServiceName, "Application"); - } + // this assumes that OpenVPNService event source has been created, since it requires elevated privileges _eventLog.Source = this.ServiceName; _eventLog.Log = "Application";