is-admin

Check if the process is running as administrator on Windows

Usage no npm install needed!

<script type="module">
  import isAdmin from 'https://cdn.skypack.dev/is-admin';
</script>

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.

Related

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