0

I'm trying to write a command line tool using NodeJS on Windows.
The tool need to execute several other exe's and according to the exit code of each of them progress or stop.

I'm able to run the other exe's using child-process but mostly for debug purposes I'll like to run the other exe inside their own console window. The other exe is doing complex things inside the console window so simply printing out the stdout is not enough.

I've try both exec and spawn and also prefix my other exe with cmd and start but nothing did the trick.

Ido Ran
  • 10,584
  • 17
  • 80
  • 143
  • possible duplicate of [node.js: Run external command in new window](http://stackoverflow.com/questions/10798586/node-js-run-external-command-in-new-window) – Mike Cluck Aug 03 '15 at 17:04
  • The other question is close but there is no answer, I'm trying to put the most specific use I need. – Ido Ran Aug 03 '15 at 18:10
  • I've try already to use cmd other_exe and start other_exe but neither open a visible console window. – Ido Ran Aug 03 '15 at 18:10
  • See http://stackoverflow.com/questions/303838/create-a-new-cmd-exe-window-from-within-another-cmd-exe-prompt. You'll need to figure out how to monitor your newly spawned process. Something you could do is run `ps` or the windows equivalent thereof before and after spawning your new window and then compare the two results. The diff will be the process number you can then monitor in node. – theideasmith Aug 04 '15 at 02:01

0 Answers0