https://github.com/dawei101/node-mac-admin
https://github.com/dawei101/node-mac-admin
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dawei101/node-mac-admin
- Owner: dawei101
- License: mit
- Created: 2023-03-17T04:51:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T05:06:00.000Z (over 3 years ago)
- Last Synced: 2025-08-16T16:47:12.139Z (10 months ago)
- Language: Objective-C++
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://lbesson.mit-license.org/)
# node-mac-admin
## Overview
```js
$ 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:
```js
admin.ask("com.google.chrome").then(function(result){
console.info("ok!")
}).catch(function(msg){
console.error(msg)
})
```