How can I verify if a Windows Service is running
I have an application in C# (2.0 running on XP embedded) that is communicating with a 'watchdog' that is implemented as a Windows Service. When the device boots, this service typically takes some time to start. I'd like to check, from my code, if the service is running. How can I accomplish this? I guess something like this would work: Add System.ServiceProcess to your project references (It's on the .NET tab). using System.ServiceProcess; ServiceController sc = new ServiceController(SERVICENAME); switch (sc.Status) { case ServiceControllerStatus.Running: return "Running"; case