Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-admin

sindresorhus123.2kMIT4.0.0TypeScript support: included

Check if the process is running as administrator on Windows

admin, administrator, windows, win32, process, running, cmd, shell, command-line, check, detect, is, root

readme

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.

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