0

I am using "node-windows" (coreybutler) as per the documented outline - here It works well.

svc.exists will tell us if the service is added to the Windows OS services or not, for example;

var svc: Service;
...
var isServiceInstalled = svc.exists;

If we execute:

svc.stop();

and look at the Windows task manager - Services, our service will show - Status: Stopped

If we execute:

svc.start();

and look at the Windows task manager - Services, our service will show - Status: Running

Is there a way to check if the service is "Stopped" or "Running" on NodeJs app?

Something like:

var isServiceRunning = svc.isRunning;
var isServiceStopped = ! svc.isRunning;

Thank you.

Felix
  • 1,662
  • 2
  • 18
  • 37

0 Answers0