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