@echo off title WinRepair Launcher :: ═══════════════════════════════════════════════════════════════ :: WinRepair Launcher :: Handles UAC elevation + bypasses execution policy :: ═══════════════════════════════════════════════════════════════ :: Check for admin rights net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting Administrator privileges... powershell -NoProfile -Command "Start-Process cmd.exe -ArgumentList '/c \"\"%~f0\"\"' -Verb RunAs" exit /b ) :: We are admin — change to script directory and run pushd "%~dp0" echo Starting WinRepair... powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\WinRepair.ps1" :: If PowerShell exits with an error, show it if %errorlevel% neq 0 ( echo. echo ERROR: WinRepair exited with error code %errorlevel% echo Check WinRepair_Error.log for details. pause ) popd