coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.83k stars 356 forks source link

Question: Service does not work as I expect. Is it a Windows/permissions problem? #208

Closed rovico closed 4 years ago

rovico commented 6 years ago

Hello everyone! . First of all, this project is awesome!

P.S. Sorry for the strange question. Maybe it's better to place it on StackOverflow...

What i am trying to do:

I need a solution to programmatically restart my 3G modem on some trigger using nodejs. I used cmd script with rasdial command that i run with nodejs child-process.exec and it works good. I open Windows CMD console and run my simple script. On trigger my 3G modem is restarting as i expected...

But when I am trying to start my nodejs script as service, my cmd script runs. "rasdial connectionName \DISCONNECT" works good, but next command "rasdial connectionName" does not work. In output log i see Error 623.

Can it be bound with "node-windows" or it is a Windows/permissions problem?

coreybutler commented 6 years ago

I'm really not sure... it's entirely possible this is a permissions problem. I'd suggest checking the permissions you're running the service as.