#502 Interrogate, start and stop services

open
nobody
None
5
2010-12-22
2010-12-22
Anonymous
No

It would be useful to interrogate the running/stopped state of a named service and be able to use the result. It would also be useful to be able to start and stop a named service. (I know it's possible to use net start <servicename>, but is it language independent?) Real life example: to uninstall an SNMP extension DLL, the SNMP service must be stopped. One should not assume that the SNMP service was running; so, after removing the extension DLL, the SNMP service should only be (re)started if it was already running prior to the uninstallation.

Discussion

  • Anders
    Anders
    2010-12-22

    There are several service "helpers" on the wiki, why can't you use those?