title: node.js: Run external command in new window
body: <p>I'm writing a node.js script that permanently runs in the background and initiates file downloads from time to time. I want to use WGET for downloading the files, since it seems more robust until I really know what I'm doing with node.js.</p>
  
  <p>The problem is that I want to see the progress of the downloads in question. But I can't find a way to start WGET through node.js in a way that a new shell window is opened and displayed for WGET.</p>
  
  <p>Node's exec and spawn functions run external commands in the background and would let me access the output stream. But since my script runs in the background (hidden), there's not much I could do with the output stream.</p>
  
  <p>I've tried opening a new shell window by running "cmd /c wget..." but that didn't make any difference.</p>
  
  <p>Is there a way to run external command-line processes in a new window through node.js?</p>