Execute an exe file using node.js

you can try execFile function of child process modules in node.js

Refer:
http://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback

You code should look something like:

var exec = require('child_process').execFile;

var fun =function(){
   console.log("fun() start");
   exec('HelloJithin.exe', function(err, data) {  
        console.log(err)
        console.log(data.toString());                       
    });  
}
fun();

Leave a Comment