@echo off
title Ashen Skyfire
cd /d "%~dp0"
if not exist "Wow.exe" if not exist "Wow-64.exe" (
  echo Put this file in your World of Warcraft folder, next to Wow.exe, then run it again.
  pause & exit /b 1
)
if not exist WTF mkdir WTF
powershell -NoProfile -Command "$f='WTF\Config.wtf'; $l=@(); if(Test-Path $f){$l=@(Get-Content $f | ?{$_ -notmatch '^\s*SET\s+realmlist\s'})}; $l+=('SET realmlist '+[char]34+'ashenskyfire.duckdns.org'+[char]34); Set-Content $f $l -Encoding ASCII"
if exist "Cache" rmdir /s /q "Cache"
if exist "Wow.exe" (start "" "Wow.exe") else (start "" "Wow-64.exe")
