@echo off cd /d "%~dp0" net session >nul 2>&1 if %errorlevel% neq 0 ( echo Elevating to administrator... powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Start-Process cmd.exe -ArgumentList '/k \"\"%~f0\"\"' -Verb RunAs" exit /b ) echo Running IIS setup... powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0setup-iis.ps1" echo. pause