@echo off
setlocal
title Guild Hub Sync Setup
set "SETUPURL=https://wow.bouwens.me/downloads/GuildHubSync-Setup.ps1"
set "SETUPFILE=%TEMP%\GuildHubSync-Setup.ps1"

powershell.exe -NoProfile -ExecutionPolicy Bypass -Command ^
  "try { Invoke-WebRequest -UseBasicParsing '%SETUPURL%' -OutFile '%SETUPFILE%'; & '%SETUPFILE%' } catch { Write-Host $_.Exception.Message -ForegroundColor Red; Read-Host 'Press Enter to close'; exit 1 }"

endlocal
