elevate

Function elevate 

Source
pub fn elevate() -> Result<()>
Expand description

This function spawns a new elevated process for the current executable file

ยงExample

use windows_elevate::{check_elevated, elevate};

fn test_elevate() {
    let is_elevated = check_elevated().expect("Failed to call check_elevated");

    if !is_elevated {
        elevate().expect("Failed to elevate");
        return;
    }
    // From here, it's the new elevated process
}