/node-mac-admin

Primary LanguageObjective-C++MIT LicenseMIT

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)
})