An open API service indexing awesome lists of open source software.

https://github.com/subconsciouscompute/admin_check

Admin access check
https://github.com/subconsciouscompute/admin_check

linux osx root rust windows

Last synced: about 1 year ago
JSON representation

Admin access check

Awesome Lists containing this project

README

          

# admin_check

Check if your program has admin access.

# Supported platforms
- Windows
- OS X
- Linux

## Example

```rust
use admin_check::is_elevated;

fn main() {
if !is_elevated() {
println!(
"Warning: the program isn’t running as elevated; some functionality may not work."
);
} else {
println!("The program has admin access");
}
}
```

## References

- [stackoverflow: How to check if a process has the administrative rights](https://stackoverflow.com/questions/8046097/how-to-check-if-a-process-has-the-administrative-rights)
- [rust-lang: How do I determine if I have admin rights on Windows](https://users.rust-lang.org/t/how-do-i-determine-if-i-have-admin-rights-on-windows/35710)
- [yandexx/is_elevated](https://github.com/yandexx/is_elevated)