Polenta Elevate - PElevate

Download Portable Download Installer

PElevate Icon

Description

PElevate is a Windows utility that elevates batch files to administrator privileges using UAC (User Account Control). It automatically checks if running as admin and requests elevation if needed. Perfect for batch scripts that require administrator rights.

Platform: Windows 10/11 (x64)
License: Freeware
Version: 1.0.0

Features

PElevate provides seamless UAC elevation for your batch files:

Usage

PElevate.exe [options] [batch_file]

Examples

Simple usage in batch files (auto-detect):

@echo off
PElevate.exe
if %errorlevel% neq 0 exit /b
REM Your batch file code here...
ProgramThatNeedsElevation.exe

Explicit usage with batch file path:

PElevate.exe "%~f0"
if %errorlevel% neq 0 exit /b
REM Your batch file code here...

Elevate a specific batch file:

PElevate.exe -f script.bat
Elevate and run script.bat
PElevate.exe script.bat
Elevate and run script.bat (short form)
PElevate.exe -f script.bat -a arg1 arg2
Elevate and run script.bat with arguments

How It Works

PElevate uses the same approach as traditional batch file elevation scripts:

  1. Check Admin Status: Uses net session to check if running with administrator privileges.
  2. If Already Admin: Exits with code 0, allowing the batch file to continue execution.
  3. If Not Admin: Uses PowerShell's Start-Process with -Verb RunAs to request UAC elevation and restart the batch file as administrator. Exits with code 1 to signal the original batch file should exit.
  4. Elevated Restart: The batch file restarts with administrator privileges, PElevate detects it's already admin, and the batch file continues with full privileges.

Exit Codes

Download Portable Download Installer Back to Products