0

I tried this way..

var exec = require('child_process').exec;
var cmd = 'executable.exe';
var path = 'c:\\path';
var child = exec(
      cmd, {
        cwd: path
    },
   function(error, stdout, stderr) {
      if (error === null) {
            console.log('success');
     } else {
            console.log('error');
        }
    }
  );

But still getting error Error: spawn UNKNOWN. Any idea why I am getting this error ?

Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95

0 Answers0