@echo off
REM 双击运行（会自动请求管理员权限），把 IIS 各超时统一改成 300 秒
REM 注意：文件需与 iis-set-timeouts.ps1 放在同一目录

net session >nul 2>&1
if %errorlevel% neq 0 (
  echo 正在请求管理员权限...
  powershell -NoProfile -Command "Start-Process -Verb RunAs -FilePath '%~f0'"
  exit /b
)

powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0iis-set-timeouts.ps1" -Seconds 300
echo.
pause
