Hello. Is it possible to run the ncpa.cpl script in Windows using the Electron framework?
|
2 answers
var child = require('child_process').exec; var executablePath = "C:\\Windows\\system32\\ncpa.cpl"; child(executablePath, null, function(err, data) { console.log(err) console.log(data.toString()); }); |
Using the power of Node.js
const exec = require('child_process').exec; exec('control ncpa.cpl', (err, stdout, stderr) => { if (err) { console.error(err); return; } console.log(stdout); }); |
child_processand%windir%\system32\ncpa.cpl- Konstantin