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

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
REM Your batch file code here (runs only after elevation)...
ProgramThatNeedsElevation.exe

Explicit usage (recommended if auto-detect fails):

PElevate.exe "%~f0"
REM Your batch file code here (runs only after elevation)...

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. On self-elevation, the original non-elevated cmd.exe is terminated so the rest of the script does not run twice.
  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