5.0.19 • Published 1 year ago
runas-redux-rus v5.0.19
Runas Redux
Run command synchronously with administrator privilege.
This is an N-API based rewrite that adds compatibility with modern NodeJS versions.
Installing
npm install runas-redux-rus
Building
- Clone the repository
- Run
npm install
- Run
node-gyp configure
- Run
node-gyp build
Docs
const runas = require('runas-redux-rus')
runas(command, args, options)
options
Objecthide
Boolean - Hide the console window,true
by default.admin
Boolean - Run command as administrator,false
by default.catchOutput
Boolean - Catch the stdout and stderr of the command,false
by default.stdin
String - String which would be passed as stdin input.
Launches a new process with the given command
, with command line arguments in
args
.
This function is synchronous and returns the exit code when the command
finished.
When the catchOutput
option is specified to true
, an object that contains
exitCode
, stdout
and stderr
will be returned.
Limitations
- tell me? :)