How to check windows service status? (Whether Running/Stopped/Paused)


How to check windows service status? (Whether Running/Stopped/Paused)

Sample code in ASP.NET and C#:

ServiceController serviceController = new ServiceController(“<Service Name>”);
                status = serviceController.Status.ToString();

No comments:

Post a Comment