Beispiel #1
0
        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));
        }
Beispiel #2
0
 public void CreateService(string serviceName, string binPath, WinServiceServiceAccountInfo accountInfo, params string[] dependsOn)
 {
     ServiceControlUtils.CreateService(serviceName, binPath, accountInfo, dependsOn);
 }
Beispiel #3
0
 public void DeleteService(string serviceName)
 {
     ServiceControlUtils.DeleteService(serviceName);
 }