Answers for "how to run commands in the command prompt using javascript"

0

javascript run command

const { execSync } = require('child_process');

const output = execSync('ls', { encoding: 'utf-8' });

console.log('The output is:');
console.log(output);
Posted by: Guest on August-19-2020
0

how to run commands in the command prompt using javascript

var objShell = new ActiveXObject("Shell.Application");
        objShell.ShellExecute("cmd.exe", "C: cd C:\\pr main.exe blablafile.txt auto", "C:\\WINDOWS\\system32", "open", "1");
//NOTE: ONLY WORKS ON WINDOWS AS I KNOW OF
Posted by: Guest on October-16-2020

Code answers related to "how to run commands in the command prompt using javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language