title: Executing an exe with parameters in nodejs
body: <p>I wanted to execute an exe using node js. This is how the command looks in command prompt of windows:</p>
  
  <pre><code>oplrun -D VersionId=3458 -de "output.dat" "Test.mod" "Test.dat"
  </code></pre>
  
  <p>This runs fine and I get the output in output.dat file. Now, I wanted to execute the same with nodejs and I used execFile for this. It runs fine if I run:</p>
  
  <pre><code>var execFile = require('child_process').execFile;
  
  execFile('oplrun',['Test.mod','Test.dat'], function(err, data) {
          if(err) {
              console.log(err)
          } 
          else 
          console.log(data.toString());                       
      }); 
  </code></pre>
  
  <p>However, if I wanted to pass the output file or version as parameter, it does not execute and I am not getting any error as well. Here is the code:</p>
  
  <pre><code>var execFile = require('child_process').execFile;
  
  var path ='D:\\IBM\\ILOG\SAMPLE\\output.dat';
  
  execFile('oplrun', ['-de',path],['Test.mod','Test.dat'], function(err, data) {
          if(err) {
              console.log(err)
          } 
          else 
          console.log(data.toString());                       
      }); 
  </code></pre>
  
  <p>How do I pass the parameters if I need pass something like -D VersionId=1111 or -de output.dat.</p>
  
  <p>Thank you,
  Ajith</p>