dawei101 / node-mac-admin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIT license

node-mac-admin

Overview

$ npm i node-mac-admin

This native Node.js module allows you to get admin privilege on macOS

API

admin.ask(appId)

  • appId String - eg. com.google.chrome

Return Value Descriptions:

  • throw exception - Failed
  • not throw exception - OK

Example:

admin.ask("com.google.chrome").then(function(result){
    console.info("ok!")
}).catch(function(msg){
    console.error(msg)
})

About

License:MIT License


Languages

Language:Objective-C++ 63.3%Language:Python 18.9%Language:JavaScript 16.1%Language:Shell 1.7%