elevator 0.1.0

run programs with elevated privileges on both Windows and Unix
Documentation
elevator-0.1.0 has been yanked.

elevator

This library provides functions to run programs with elevated privileges on both Windows and Unix-like systems.

Usage

To use this library in your Rust project, add it to your Cargo.toml:

cargo add elevator_lib

Then you can use it in your Rust code:

use elevator_lib::run_elevated;

// Example: Run a program with elevated privileges
// Note: The usage for both Unix and Windows is similar
// For Unix-like systems, the library will use the `unix` module,
// while for Windows, it will use the `windows` module
fn main() {
    if let Err(err) = run_elevated("C:\\Windows\\System32\\notepad.exe", &["C:\\example.txt"]) {
      eprintln!("Error: {}", err);
    }
}

Command-line Tool

Install it using Cargo:

cargo install elevator

After installation, you can use it like this:

elevator-cli <program_path> [args...]

For example:

elevator-cli "/usr/bin/some_program" arg1 arg2

License

This project is licensed under the MIT License - see the LICENSE file for details.