Code To Test For Service Existence
bool serviceExists = false;
foreach ( System.ServiceProcess.ServiceController serviceController in System.ServiceProcess.ServiceController.GetServices())
{
if (serviceController.ServiceName == "TwentyTwentyLiveService")
{
serviceExists = true;
}
}
No comments:
Post a Comment