node.js - execute a batch script from node in seperate comamnd line -


Call a batch file from the node script and execute the script cmd running running that batch file in separate cmd cmd

  var spawn = required ('child_process'). Spawn, ls = spawn ('C: \\ user \\ priyanka.sukumaran \\ Desktop \\ vm-server \\ EpiMust.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 ('Exit from baby process code' code);});  

But the above script will not execute the batch file in a separate sim command running in the same CMD of the script it is being run. I I will batch in different command line How to excite the file ????????


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -