Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/h4rldev/check_elevation
Check elevation status directly.
https://github.com/h4rldev/check_elevation
admin elevation rust rust-lang uac winapi windows
Last synced: about 2 months ago
JSON representation
Check elevation status directly.
- Host: GitHub
- URL: https://github.com/h4rldev/check_elevation
- Owner: h4rldev
- License: bsd-2-clause
- Created: 2023-10-08T16:23:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-11T09:36:52.000Z (over 1 year ago)
- Last Synced: 2024-11-19T01:08:30.516Z (2 months ago)
- Topics: admin, elevation, rust, rust-lang, uac, winapi, windows
- Language: Rust
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# check_elevation
[![license](https://img.shields.io/github/license/h4rldev/check_elevation?style=flat-square)](https://crates.io/crates/check_elevation)
[![version](https://img.shields.io/crates/v/check_elevation?style=flat-square)](https://crates.io/crates/check_elevation)A tool to check the elevation status through a simple function.
Successor to [is_elevated](https://crates.io/crates/is_elevated).
#### Example
```rust
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
- [windows](https://crates.io/crates/windows)