A node module to query, stop (optionally forcefully) and start Windows services
npm install windows-service-managersc and taskkill programs which is present
name: the service name
description: the optional service description, may not be present
state: an integer state code with the following possible values
stateDescription: the textual description of the state as shown above
pid: the process identifier for the service, if it is running
queryServices asynchronously returns an array of service objects, for all services installed on the system.
callback: a callback function function(error, service):
error: error that occured or null if no error
service: an array of service objects for all installed services.
queryService asynchronously returns an service object for the service with the specified name.
name: the name of the service to query.
callback: a callback function function(error, service):
error: error that occured or null if no error
service: a service object for the service named name.
startService asynchronously starts a service with the specified name. If the service is already started, no error is returned.
name: the name of the service to start.
timeoutSeconds: number of seconds to poll before returning. If 0, no polling is done. If a non-zero value, service status is
callback: a callback function function(error, service):
error: error that occured or null if no error
service: a service object for the service named name.
stopService asynchronously stops a service with the specified name. If the service is already stopped, no error is returned.
name: the name of the service to stop.
timeoutSeconds: number of seconds to poll before returning. If 0, no polling is done. If a non-zero value, service status is
forceKill: boolean that specifies whether the service process should be killed if the service has not stopped within a non zero timeout interval.
callback: a callback function function(error, service):
error: error that occured or null if no error
service: a service object for the service named name.