Open kodypeterson opened 10 years ago
Did you ever figure this out?
Nope, still a problem
Sorry for the delay, I missed the notification.
I don't know what req.params.script
is, and what's the error you get.
Maybe you should write the logs to a file, checkout winston or bunyan
I think there is a problem with running an executable from a windows service after XP.
Yeah, so req.params.script is the location to the executable. So lets just say this is the code failing:
var exec = require('child_process').execFile; exec("C:\scripts\test.exe", function(error, stdout, stderr){ console.log(arguments); });
Did you manage to figure this problem of the exec command not working to a .exe file?
I am trying to use the following. It works when ran with "node app.js" but not from within the service:
var exec = require('child_process').execFile; exec("C:\scripts\" + req.params.script + ".exe", function(error, stdout, stderr){ console.log(arguments); });
Any ideas?