Skip to content

Check if the process is running as administrator on Windows

License

Notifications You must be signed in to change notification settings

sindresorhus/is-admin

Repository files navigation

is-admin

Check if the process is running as administrator on Windows

Install

$ npm install is-admin

Usage

import isAdmin from 'is-admin';

console.log(await isAdmin());
//=> false

API

isAdmin()

Returns a Promise<boolean> indicating whether the process is running as administrator.

Related

  • is-elevated - Check if the process is running with elevated privileges (cross-platform)