paul walker

paul walker

  • NA
  • 30
  • 0

Checking Services on a Server

Feb 15 2010 5:42 AM

Hi,
Can someone help?  I need to write an application that will check whether a set of services are running on a server.  The application will check every 5 minutes.
I am aware of the ServiceController object that can check the status of a service, but what I want to do is check the all the services running under a specific 'Log On As', rather than hard-code the name of the service.
Does anyone know if there is an object that exposes the services as a collection so that I can write a foreach statement to check the services?
Thanks
Paul

Answers (3)