tbenbrahim / windows-service-manager

A node module to query, start and stop Windows services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

queryServices() returns only services in the RUNNING state

adityamedhe opened this issue · comments

The documentation on NPM says that queryServices() returns all the services installed on the system. However on running the method, I can see only the services in the RUNNING state being returned in the callback.

My code, for reference:
I am calling the method every second, and storing the retrieved information in infoStore, which is then sent as a HTTP response to every client.

var infoStore = {};

setInterval(serviceManager.queryServices, 1000, function(err, services) {
    console.log('HEART_BEAT');
    infoStore = services;
});

I have created a pull request - #2 to solve this issue. Please let me know your thoughts.

Thank you very much for the PR, it is merged now.