Merge pull request #515 from NextTurn/eventlog

Ensure event source is registered during installation
This commit is contained in:
Oleg Nenashev
2020-04-18 14:32:30 +02:00
committed by GitHub

View File

@@ -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()