var child_process = require('child_process');
var output = child_process.execSync('echo %username% is stupid :( ');
alert(output);
Simply trying to execute echo %username% is stupid :(
in Windows’s CMD, and get output of it, which would be admin is stupid :(
, but, instead I get hugged with message:
Uncaught Error: EPERM: operation not permitted, write from fs.js:663.
sigh, I could guess what E_Permission is but I don’t know how to grant it, nor how assigning variable involves I/O management (fs.js).
This Sir have found an answer? But then after some attempts he gave up handling it with try
and catch
. I’d just like to save the answer in variable. Possible ?
I’ve done some further research on that, but the solutions have been either too old (and repositories redirected me to “child-process”) or they weren’t solving my issue as they forced me to write it in a file, the list goes on.