I have a Windows Service (written in Java) that needs to start other Windows Services under certain circumstances. I do this by simply pumping out "sc" commands to the command line.
If the windows service I'm trying to start is disabled, the startup will obviously fail. I'd like to determine this beforehand and not bother to trying to start it up.
However, if the "disabled" state is somewhere in the "sc query" command, I have yet to find it. Is there any way I can detect if a windows service is disabled in Java, preferably though the command line?
Thanks!