call a batch file from node script and run that batch file in separate cmd with out executing the running script cmd
var spawn = require('child_process').spawn,
ls = spawn('C:\\Users\\priyanka.sukumaran\\Desktop\\vm-server\\appiumStart.bat', ['-lh', '/usr']);
ls.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});
ls.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
ls.on('exit', function (code) {
console.log('child process exited with code ' + code);
});
but while running the above script the batch file will not execute in seperate cmd it executed in the same cmd of the script i run. How can i excute the batch file in seperate command line????????