Search code examples
nw.js

Open another .exe from nwjs app


I have created an app in nw.js & it is running fine.

I have a requirement that I create a button in nwjs app (html page), and its click should open another .exe file in the user system(probably in the same directory along with nwjs.exe).

Can I do that and how?

Thanks


Solution

  • var exec = require('child_process').execFile;
    
    exec('C:/asd/test.exe', function(err, data) {  
            console.log(err)
            console.log(data.toString());                       
    });