0.1.3 • Published 8 years ago
spawn-as-admin v0.1.3
spawn-as-admin
Run commands with administrator privileges
Installing
npm install spawn-as-adminDocs
spawnAsAdmin(command, arguments)
Launches a new process with the given command, and arguments.
Returns an AdminProcess object that implements a subset of node's ChildProcess API:
Properties:
pid- The child process's process ID.stdin- AWritableStreamrepresenting the process's standard input.stdout- AReadableStreamrepresenting the process's standard output.
Methods:
kill([signal])- Sends the givensignalto the child process. If no signal is specified,SIGTERMwill be sent.
Events:
exit- Emitted when the process exits, and passes the exit code of the process.
Limitations
- The library only works on macOS and Windows.
- The
stdinandstdoutproperties are only present on macOS.