#winapi #uac #administrator #elevate #windows

no-std check_elevation

Check if the current process is elevated. A successor to the is_elevated crate. Now no_std!

5 releases

0.2.4 Oct 11, 2023
0.2.3 Oct 9, 2023
0.1.2 Oct 8, 2023

#241 in Windows APIs

Download history 48/week @ 2024-12-11 12/week @ 2024-12-18 3/week @ 2024-12-25 10/week @ 2025-01-01 43/week @ 2025-01-08 44/week @ 2025-01-15 15/week @ 2025-01-22 15/week @ 2025-01-29 69/week @ 2025-02-05 14/week @ 2025-02-12 41/week @ 2025-02-19 71/week @ 2025-02-26 24/week @ 2025-03-05 30/week @ 2025-03-12 23/week @ 2025-03-19 29/week @ 2025-03-26

137 downloads per month

BSD-2-Clause

5KB

check_elevation

license version

A tool to check the elevation status through a simple function.

Successor to is_elevated.

Example

use check_elevation::is_elevated;


fn main() {
    if is_elevated().expect("Failed to get elevation status.") {
        println!("Running as administrator.");
    } else {
        println!("Not running as administrator.");
    }
}

Dependencies

Dependencies

~122MB
~2M SLoC