0

I wanted to launch simple notepad application from nodejs server running as windows service.

So first i created a nodejs "server.js" file which contain following code :

   require("child_process").exec("notepad");

When i run "node server.js" in command prompt the notepad is opening properly.

But after this i made this nodejs server as windows service and when i start the service notepad is not opening at all.[not specifically notepad,any app which has GUI is not opening.]

To make it as windows service i have used node-windows as well as qckwinsvc,but both giving same result.

why i am unable to launch notepad when node.js server running as windows service.,which works fine when i run server.js file manually from command prompt.

Please help me.

  • Did you check processes? Maybe it's in there but not visible (windows services are really not meant to be interactive). Did you check the windows event log also, maybe your service wrote something there. – Nick.Mc Feb 02 '16 at 12:44
  • (By process I mean task manager) – Nick.Mc Feb 02 '16 at 22:53
  • hi,thanks for the suggestion, Process is not there in task manager as well as there is nothing in system event log. – shadanana upadhya Feb 03 '16 at 07:28
  • hi after googling a lot i came to know that,this is because of SERVICE_INTERACTIVE_PROCESS flag is not set.Once i set its working. – shadanana upadhya Feb 03 '16 at 07:30
  • But when i run the service and when my application opens resolution of my computer is changing and its taking me to new GUI, i dont know why ..If you have any idea please help me... – shadanana upadhya Feb 03 '16 at 07:31
  • I don't know why it does that but windows services are not made to be interactive. What are you actually trying to do? or are you just experimenting? Like I said if you leave interactive off and check task manager you'll probably find notepad in there even though it isn't visible. – Nick.Mc Feb 03 '16 at 09:20
  • ok...thanks for the information – shadanana upadhya Feb 03 '16 at 10:06

0 Answers0