. System.ServiceProcess.ServiceController sc = new System.ServiceProcess.ServiceController();
sc.ServiceName = "ServiceName";
if (sc.Status == System.ServiceProcess.ServiceControllerStatus.Running)
{
sc.Stop();
}
0 comments:
Post a Comment