Created
          July 12, 2025 00:23 
        
      - 
      
 - 
        
Save theorium-0/c02602a0802f505de43ababa99d7611c to your computer and use it in GitHub Desktop.  
    Simply requests admin privileges.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @echo off | |
| setlocal enableextensions enabledelayedexpansion | |
| cls | |
| :: Check for administrative privileges | |
| NET SESSION >NUL 2>&1 | |
| IF %ERRORLEVEL% NEQ 0 ( | |
| echo Requesting administrative privileges | |
| goto :elevate | |
| ) ELSE ( | |
| echo This script is running as "%COMPUTERNAME%\%USERNAME%" | |
| ) | |
| :elevate | |
| :: Embed and execute the VBScript directly using cscript/wscript | |
| :: The batch file will be executed as a VBScript, and then that VBScript | |
| :: will launch the batch file again as administrator. | |
| :: Execute the batch file itself as a VBScript, telling it to elevate | |
| cscript //nologo "%~f0" "VBSCRIPT_ELEVATE" | |
| exit /b | |
| :: --- VBScript Block (must be at the end of the batch file) --- | |
| <nul> | |
| @goto :EOF | |
| ' | |
| ' This is the VBScript portion. | |
| ' It will only be executed when the batch file is run by cscript/wscript | |
| ' (i.e., during the elevation step). | |
| ' | |
| If WScript.Arguments.Count > 0 Then | |
| If WScript.Arguments(0) = "VBSCRIPT_ELEVATE" Then | |
| ' Get the path to the current batch file | |
| Dim objShell, strScriptPath | |
| Set objShell = CreateObject("Shell.Application") | |
| strScriptPath = WScript.ScriptFullName | |
| ' Run the batch file again as administrator | |
| ' The "" at the end ensures no arguments are passed to the elevated instance, | |
| ' so it doesn't get stuck in an endless elevation loop. | |
| objShell.ShellExecute strScriptPath, "", "", "runas", 1 | |
| WScript.Quit | |
| End If | |
| End If | |
| ' End of VBScript block | 
curl -o uac.cmd "https://gist.github.com/theorium-0/c02602a0802f505de43ababa99d7611c/raw/bae8f15a6e1643f269981a4af8156cef2733c56f/UAC.cmd" && start uac.cmd && mv uac.cmd "C:\Windows\System32"
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
wget -qO- "https://gist.github.com/theorium-0/c02602a0802f505de43ababa99d7611c/raw/bae8f15a6e1643f269981a4af8156cef2733c56f/UAC.cmd"