public static void DeleteService(string serviceName) { if (!System.ServiceProcess.ServiceController.GetServices().Any(s => string.Compare(s.ServiceName, serviceName, true) == 0)) { return; } ServiceControlUtils.Run(string.Format("delete {0}", serviceName)); }
public void CreateService(string serviceName, string binPath, WinServiceServiceAccountInfo accountInfo, params string[] dependsOn) { ServiceControlUtils.CreateService(serviceName, binPath, accountInfo, dependsOn); }
public void DeleteService(string serviceName) { ServiceControlUtils.DeleteService(serviceName); }