Package Exports
- admin-check
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (admin-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Admin Check
Admin Check is an NPM package to check if the current script is running with admin privileges.
Currently only available for Windows. It uses a native Windows command("net session") that is only available with admin privileges to check if the admin privileges are present.
Installation
Use the package manager NPM to install Admin Check.
npm i admin-check
Usage
Returns a <Boolean>
which is true when admin privileges are present.
const admin = require("admin-check");
admin.check().then(result => {
if (result) {
// Do something when admin privileges are present
} else {
// Do something when admin privileges are NOT present
}
});
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.