Funny, because I did an AVG scan before uploading, and it found nothing.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Gui, Add, Text, w400 x5 y12 cRed vPathage, -nothing-
Gui, Show, w400 h40 xCenter yCenter, Scan Window
WarDir := "empty"
DriveInt := 65
Loop, 26
{
if WarDir = empty
{
DriveStr := Chr(DriveInt)
DriveGet, currentDrive, Status, %DriveStr%:
if currentDrive = Ready
{
Loop, %DriveStr%:\*.exe, 0, 1
{
GuiControl,, Pathage, %A_LoopFileFullPath%
if A_LoopFileName = Warcraft III.exe
{
;;;;WarPath = %A_LoopFileFullPath%
WarDir := A_LoopFileDir
break
}
}
}
else
{
}
DriveInt++
}
else
{
break
}
}
if WarDir = empty
{
GuiControl,, Pathage, Could not find file path!
}
else
{
GuiControl,, Pathage, Directory found!
}
;;Write to reg
RegWrite, REG_DWORD, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III, Allow Local Files, 0x00000000
RegWrite, REG_MULTI_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III, Battle.net Gateways, 1007`n01`nuswest.battle.net`n8`nLordaeron (U.S. West)`nuseast.battle.net`n6`nAzeroth (U.S. East)`nasia.battle.net`n-9`nKalimdor (Asia)`neurope.battle.net`n-1`nNorthrend (Europe)`nbeta.battle.net`n8`nWestfall (Beta)`n
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III, InstallPath, %WarDir%
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III, InstallPathX, %WarDir%
Program := WarDir . "\Warcraft III.exe"
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III, Program, %Program%
ProgramX := WarDir . "\Frozen Throne.exe"
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III, ProgramX, %ProgramX%
SavePath := WarDir . "\save"
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt0, Path0, %SavePath%
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt0, Path1, %SavePath%
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt0, Path2, %SavePath%
ReplayPath := WarDir . "\replay"
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt1, Path0, %ReplayPath%
LogsPath := WarDir . "\Logs"
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt2, Path0, %LogsPath%
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt2, Path1, %LogsPath%
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt2, Path2, %LogsPath%
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt2, Path3, %LogsPath%
ErrorsPath := WarDir . "\Logs"
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\DelOpt3, Path0, %ErrorsPath%
RegWrite, REG_SZ, HKEY_CURRENT_USER, SOFTWARE\Blizzard Entertainment\Warcraft III\String, userbnet, RegReset
GuiControl,, Pathage, Inserting registry complete! You may close this.
return
GuiClose:
ExitApp