coreybutler / coreybutler/node-windows

Child process error

Open
#163 6 comments 0 reactions 0 assignees View on GitHub
question (better for stackoverflow)
Dominant language
JavaScript
Stars
2.9k
Forks
368
PR merge metrics
No merged PRs in 30d

Description

Hi,

We have made a `node-windows` service that have a main script that run a child process command to open an .exe like this
```
var cp = require("child_process");
cp.exec("C:\\Users\\test\\Desktop\\file.exe", function(error, stdout) {
});
```
If we run `node main.js` it's work like expected, but if we run service it throw error
`Command failed` I don't know why.. Any idea?

Contributor guide

Open the contributing guide

Research direction

Start with the child_process.exec call shown in main.js and reproduce the difference between running node main.js and running the same command as a node-windows service. Inspect the service execution context and the error returned by the callback; done means the cause of Command failed is identified and the executable behavior is explained or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.