windows-elevate 0.1.0

windows-elevate is a Windows-only library which provides utility functions to help elevating process permissions.
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented1 out of 1 items with examples
  • Size
  • Source code size: 15.17 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.37 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 30s Average build duration of successful builds.
  • all releases: 30s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • NenX/windows-elevate
    6 1 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • NenX

windows-elevate

windows-elevate is a Windows-only crate, it provides two utility functions:

  • check_elevated() is used to determine whether the current process is running as elevated.
  • elevate() is used to elevate the current process permissions.

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
}