Closed 50l3r closed 5 years ago
Please see the wiki, specifically https://github.com/coreybutler/node-windows/wiki#my-script-runs-fine-on-its-own-but-not-with-node-windows-why.
I'm fairly certain the issue is script: require('path').join(__dirname,'server.js')
.
You most likely want script: require('path').join(proccess.cwd(),'server.js')
instead.
Please see the wiki, specifically https://github.com/coreybutler/node-windows/wiki#my-script-runs-fine-on-its-own-but-not-with-node-windows-why.
I'm fairly certain the issue is
script: require('path').join(__dirname,'server.js')
.You most likely want
script: require('path').join(proccess.cwd(),'server.js')
instead.
Same problem. Process execute in background:
Apologies, I misunderstood your original issue (even though you were clear in your writing).
Since the process is running, node-windows is working. Remember, node-windows is designed for running background processes. It will not launch a GUI. If you want to do this, it's possible, but you'd need to write some code in your app to launch the GUI. That's outside the scope of what node-windows does, but I'm pretty sure you can find help if you Google "launching GUI from Node.js".
Closing since this appears to be an application issue, not a node-windows issue.
I create a service like this:
And modify desktop interaction to the server
But process only execute in background. Process named Hyperspin.exe:
This is my code:
var options = { cwd: 'C:\Hyperspin\' };