Win32::Service Determining which are set to start automatically

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi everyone,

I am trying to write a script that checks to make sure all services that
are set to start automatically are running.  If they are not I want to
try to restart them and report an error otherwise.

The problem I am having is that I cannot find a way to deferentiate
between and service that is set to start automatically and one that is
manually set to start.

Using Win32::Service::GetStatus() seems to return '4' when the service
is running and '1' when the service is stopped.  These values don't seem
to change if I set to something to start automatically or manually they
only seem to take into account the current status.

Is there away to determine if a service is supposed to startup

Thanks in Advance


Site Timeline