coreybutler / node-windows

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

Interactive services #253

Closed kadosh1000 closed 4 years ago

kadosh1000 commented 4 years ago

Hi, I need my service to be able to be interactive (for example, open notepad). For that I've understood that SERVICE_INTERACTIVE_PROCESS flag should be added or set.

How can it be done?

davidizac commented 4 years ago

Same issue... require("child_process").exec("notepad"); After wrapped this sample line of code as a windows service using node-windows, it does not open the notepad. Any idea @coreybutler ?

coreybutler commented 4 years ago

This is all done with Child Process. Take a look at this stackoverflow answer.

The SERVICE_INTERACTIVE_PROCESS is a C# flag that can be set when creating a service... not my area of expertise. node-windows uses winsw under the hood, so you may want to start your search there.

Closing since this seems to be application-specific, not necessarily a node-windows issue.