/// <summary> /// Uninstall the OpaqueMail Proxy service. /// </summary> private void UninstallService() { if (ServiceExists(FConstants.ServiceName)) { ProxyServiceInstaller installer = new ProxyServiceInstaller(); installer.Install(true, new string[] { }); } }
/// <summary> /// Uninstall the OpaqueMail Proxy service. /// </summary> private void UninstallService() { if (ServiceExists("OpaqueMailProxy")) { ProxyServiceInstaller installer = new ProxyServiceInstaller(); installer.Install(true, new string[] { }); } }
private static void InstallService() { Console.ForegroundColor = ConsoleColor.DarkMagenta; if (!ServiceExists(FConstants.ServiceName)) { logger.Write("[H] Installing Service..."); ProxyServiceInstaller installer = new ProxyServiceInstaller(); Console.ForegroundColor = ConsoleColor.DarkGray; installer.Install(false, new string[] { }); Console.ForegroundColor = ConsoleColor.Magenta; logger.Write("...done", true); } else { logger.WriteLine("[H] Service already exist!"); } Console.ResetColor(); }
private static void UninstallService() { try { Console.ForegroundColor = ConsoleColor.DarkMagenta; if (ServiceExists(FConstants.ServiceName)) { logger.WriteLine("[H] UnInstalling Service..."); Console.ForegroundColor = ConsoleColor.DarkGray; ProxyServiceInstaller installer = new ProxyServiceInstaller(); installer.Install(true, new string[] { }); Console.ForegroundColor = ConsoleColor.Magenta; //logger.Write("...done", true); } else { logger.WriteLine("[H] Service not exist!"); } Console.ResetColor(); } catch { } }