On clicking a button, I want to run a node file main.js on cmd terminal.
I did:
var ip ="f:\ node main.js ";
function pingItjs(ip) {
var oShell = new ActiveXObject("wscript.shell");
oShell.run("cmd.exe /k" + ip);
}
but it only opens a cmd with F:\ drive and doesn't append the command:
node main.js
How can I do that?