spawn-as-admin

0.1.3 • Public • Published

spawn-as-admin

Build Status Build status

Run commands with administrator privileges

Installing

npm install spawn-as-admin

Docs

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 - A WritableStream representing the process's standard input.
  • stdout - A ReadableStream representing the process's standard output.

Methods:

  • kill([signal]) - Sends the given signal to the child process. If no signal is specified, SIGTERM will 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 stdin and stdout properties are only present on macOS.

Readme

Keywords

none

Package Sidebar

Install

npm i spawn-as-admin

Weekly Downloads

5

Version

0.1.3

License

none

Last publish

Collaborators

  • maxbrunsfeld