private static void RegisterEventSource() { EventSourceInstaller.InstallSecurityEventSource( EventLogName, null, //@"D:\Auditing\SampleApplication\SampleMessageFile.DLL", null, null, Assembly.GetEntryAssembly().Location, //@"D:\Auditing\SampleApplication\Ogamat.AuditProvider.Examples.exe", false); }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); string installPath = ConfigurationContext.Setup.InstallPath; try { this.InstallMPAuditLog(installPath); } catch (InvalidOperationException) { EventSourceInstaller.UninstallSecurityEventSource("MSExchange Messaging Policies"); this.InstallMPAuditLog(installPath); } TaskLogger.LogExit(); }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); EventSourceInstaller.UninstallSecurityEventSource("MSExchange Messaging Policies"); TaskLogger.LogExit(); }
private static void UnRegisterEventSource() { EventSourceInstaller.UninstallSecurityEventSource(EventLogName); }
private void InstallMPAuditLog(string path) { EventSourceInstaller.InstallSecurityEventSource("MSExchange Messaging Policies", Path.Combine(path, "bin\\RulesAuditMsg.DLL"), null, null, Path.Combine(path, "bin\\EdgeTransport.exe"), false); }