internal void InstallEventManifest() { try { if (ManageEventManifest.UpdateMessageDllPath(this.CrimsonEventManifestFile, this.CrimsonEventMsgDll, this.CrimsonEventProviderName)) { ManageEventManifest.Install(this.CrimsonEventManifestFile); } else { base.WriteError(new InvalidOperationException(Strings.EventManifestNotUpdated(this.CrimsonEventManifestFile, this.CrimsonEventMsgDll, this.CrimsonEventProviderName)), ErrorCategory.InvalidOperation, null); } if (ManageEventManifest.UpdateMessageDllPath(this.DbFailureItemEventManifestFile, this.DbFailureItemEventMsgDll, this.DbFailureItemProviderName)) { ManageEventManifest.Install(this.DbFailureItemEventManifestFile); } else { base.WriteError(new InvalidOperationException(Strings.EventManifestNotUpdated(this.DbFailureItemEventManifestFile, this.DbFailureItemEventMsgDll, this.DbFailureItemProviderName)), ErrorCategory.InvalidOperation, null); } } catch (InvalidOperationException exception) { base.WriteError(exception, ErrorCategory.InvalidOperation, null); } }
protected void UninstallEventManifest() { try { ManageEventManifest.Uninstall(this.DbFailureItemEventManifestFile); ManageEventManifest.Uninstall(this.CrimsonEventManifestFile); } catch (InvalidOperationException exception) { base.WriteError(exception, ErrorCategory.InvalidOperation, null); } }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); string manifestName = Path.Combine(ConfigurationContext.Setup.InstallPath, this.DefinitionXml); try { ManageEventManifest.Uninstall(manifestName); } catch (InvalidOperationException exception) { base.WriteError(exception, ErrorCategory.InvalidOperation, null); } TaskLogger.LogExit(); }
protected override void InternalProcessRecord() { TaskLogger.LogEnter(); string text = Path.Combine(ConfigurationContext.Setup.InstallPath, this.DefinitionXml); string text2 = Path.Combine(ConfigurationContext.Setup.InstallPath, this.MessageDll); try { if (ManageEventManifest.UpdateMessageDllPath(text, text2, this.ProviderName)) { ManageEventManifest.Install(text); } else { base.WriteError(new InvalidOperationException(Strings.EventManifestNotUpdated(text, text2, this.ProviderName)), ErrorCategory.InvalidOperation, null); } } catch (InvalidOperationException exception) { base.WriteError(exception, ErrorCategory.InvalidOperation, null); } TaskLogger.LogExit(); }
internal static void SetChannelAttribute(string verb, string channelName, string arguments) { ManageEventManifest.DoWevtutilAction(string.Format("{0} {1} {2}", verb, channelName, arguments)); }
internal static void Uninstall(string manifestName) { ManageEventManifest.DoManifestAction(manifestName, "uninstall-manifest"); }