| Crates.io | check_elevation |
| lib.rs | check_elevation |
| version | 0.2.7 |
| created_at | 2023-10-08 16:43:34.014746+00 |
| updated_at | 2025-06-19 08:10:12.921144+00 |
| description | Check if the current process is elevated. A successor to the `is_elevated` crate. Now no_std! |
| homepage | https://github.com/h4rldev/check_elevation |
| repository | https://github.com/h4rldev/check_elevation |
| max_upload_size | |
| id | 997280 |
| size | 8,785 |
A tool to check the elevation status through a simple function.
Successor to is_elevated.
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.");
}
}