@echo off
setlocal

title RetroD2 PUBLIC - Dodaj gateway Diablo II

echo.
echo ==============================================
echo  RetroD2 PUBLIC - dodawanie gateway Diablo II
echo ==============================================
echo.
echo Adres serwera: trenuwa.mywire.org
echo.

powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$gateways = @('1002','01','trenuwa.mywire.org','-1','RetroD2','europe.battle.net','-1','Europe','useast.battle.net','-1','U.S. East','uswest.battle.net','-1','U.S. West','asia.battle.net','-1','Asia'); ^
$keys = @('HKCU:\Software\Battle.net\Configuration','HKCU:\Software\Wow6432Node\Battle.net\Configuration','HKCU:\Software\Blizzard Entertainment\Battle.net\Configuration','HKCU:\Software\Wow6432Node\Blizzard Entertainment\Battle.net\Configuration'); ^
foreach ($key in $keys) { New-Item -Path $key -Force | Out-Null; Set-ItemProperty -Path $key -Name 'Diablo II Battle.net gateways' -Type MultiString -Value $gateways; Set-ItemProperty -Path $key -Name 'Battle.net gateways' -Type MultiString -Value $gateways }; ^
Write-Host 'Dodano gateway RetroD2 -> trenuwa.mywire.org'"

echo.
echo Gotowe.
echo Uruchom Diablo II / Cactus ponownie i wybierz bramke RetroD2.
echo.
pause
