5.0.19 • Published 3 years 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-rusBuilding
- 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)
optionsObjecthideBoolean - Hide the console window,trueby default.adminBoolean - Run command as administrator,falseby default.catchOutputBoolean - Catch the stdout and stderr of the command,falseby default.stdinString - 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? :)