#elevation #windows #winapi #uac #process-running

is_elevated

Determine whether your Windows process is running elevated or not

3 releases

Uses old Rust 2015

0.1.2 Mar 28, 2019
0.1.1 Mar 28, 2019
0.1.0 Mar 28, 2019

#167 in Windows APIs

Download history 853/week @ 2024-07-28 899/week @ 2024-08-04 1305/week @ 2024-08-11 960/week @ 2024-08-18 902/week @ 2024-08-25 1287/week @ 2024-09-01 920/week @ 2024-09-08 681/week @ 2024-09-15 706/week @ 2024-09-22 790/week @ 2024-09-29 862/week @ 2024-10-06 813/week @ 2024-10-13 890/week @ 2024-10-20 1241/week @ 2024-10-27 1166/week @ 2024-11-03 1197/week @ 2024-11-10

4,536 downloads per month
Used in 3 crates

MIT license

5KB

is_elevated is a simple Windows-only crate that lets you determine whether the current process is running as elevated (also known “as administrator,” or integrity level High), or not (integrity level Medium or lower).

Example

use is_elevated::is_elevated;

if !is_elevated() {
    println!(
        "Warning: the program isn’t running as elevated; some functionality may not work."
    );
}

lib.rs:

is_elevated is a simple Windows-only crate that lets you determine whether the current process is running as elevated (also known “as administrator,” or integrity level High), or not (integrity level Medium or lower).

Example

use is_elevated::is_elevated;

if !is_elevated() {
    println!(
        "Warning: the program isn’t running as elevated; some functionality may not work."
    );
}

Dependencies

~225KB