Skip to content

h4rldev/check_elevation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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