@gifyourgame/spawn-as-admin

1.0.0 • 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.

/@gifyourgame/spawn-as-admin/

    Package Sidebar

    Install

    npm i @gifyourgame/spawn-as-admin

    Weekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    38.9 MB

    Total Files

    16

    Last publish

    Collaborators

    • andrewchae
    • kcoltongyg
    • djardine
    • chrisdinh
    • ronlad