public override void Install(IDictionary stateSaver) { CheckAdministratorRole(); OpenFirewallPorts(); base.Install(stateSaver); // Install the event log ReflectorEventLog.Install(); // Install performance counters PCInstaller.Install(); }
public override void Uninstall(IDictionary savedState) { CheckAdministratorRole(); // Stop the service first if it is still running ServiceController sc = new ServiceController(ReflectorMgr.ReflectorServiceName); if (sc.Status == ServiceControllerStatus.Running) { sc.Stop(); sc.WaitForStatus(ServiceControllerStatus.Stopped); } RemoveFirewallPorts(); base.Uninstall(savedState); // Uninstall the event log ReflectorEventLog.Uninstall(); // Uninstall performance counters PCInstaller.Uninstall(); }