@echo off REM Double-click to run %~n0.ps1 with UAC elevation. REM All output goes to this window AND C:\Windows\Temp\setup.log. fltmc >nul 2>&1 if %errorLevel% neq 0 ( powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" exit /b ) echo ============================================================ echo Running: %~n0 echo Log : C:\Windows\Temp\setup.log echo ============================================================ echo. powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dpn0.ps1" set RC=%errorLevel% echo. echo ============================================================ echo Done (exit code %RC%) echo ============================================================ pause