mirror of
https://github.com/winsw/winsw.git
synced 2025-12-10 18:37:28 +08:00
Merge pull request #515 from NextTurn/eventlog
Ensure event source is registered during installation
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user