Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

pulsar-edit/spawn-as-admin

 
 

Repository files navigation

This Repo is archived under Pulsar-Edit since it is not used.

spawn-as-admin

CI

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.

About

🔒 Spawn a child process with admin privileges

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Languages

  • C++ 61.4%
  • JavaScript 31.0%
  • Python 7.6%