fixed bug reinstall scheduler service

This commit is contained in:
vfedosevich 2013-11-27 17:39:00 +03:00
parent 2b68bfb8bf
commit 8851dc1212
2 changed files with 35 additions and 3 deletions

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.IO;
using System.Text;
using System.DirectoryServices;
using System.DirectoryServices.ActiveDirectory;
@ -1099,7 +1100,18 @@ namespace WebsitePanel.Setup
}
#endregion
}
#region Windows Services
public static void DeleteService(string serviceName)
{
var wmiService = wmi.GetObject(String.Format("Win32_Service.Name='{0}'", serviceName));
wmiService.Delete();
}
#endregion
}
#region Enums
[Flags]