Skip to content

Latest commit

 

History

History
 
 

sample-scripts

gsudo Sample Scripts

This folder contains sample scripts demonstrating how to use gsudo to elevate privileges on a Windows machine. The provided scripts include:

  1. Script Self-Elevation: A technique to ensure that the current script is running elevated, by detecting when it is not, and elevating itself. More details can be found in the gsudo documentation on script self-elevation.

  2. Many Elevations Using gsudo Cache:

  3. Don't show an UAC pop-up: Perform an elevated admin task if and only if it can be done without an interactive UAC pop-up. (i.e. when already elevated or gsudo cache is active)

These scripts are examples and should be used with caution. Always review and understand the code you are executing on your system.