diff --git a/src/Core/ServiceWrapper/Main.cs b/src/Core/ServiceWrapper/Main.cs index 93345b0..8003e2c 100644 --- a/src/Core/ServiceWrapper/Main.cs +++ b/src/Core/ServiceWrapper/Main.cs @@ -728,6 +728,12 @@ namespace winsw rawSecurityDescriptor.GetBinaryForm(securityDescriptorBytes, 0); _ = Advapi32.SetServiceObjectSecurity(sc.Handle, SecurityInfos.DiscretionaryAcl, securityDescriptorBytes); } + + string eventLogSource = descriptor.Id; + if (!EventLog.SourceExists(eventLogSource)) + { + EventLog.CreateEventSource(eventLogSource, "Application"); + } } void Uninstall()