Page 1 of 1

Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 22nd, 2009, 2:01 am
by Perhaps
This is a tool that was a collab project between SomethingGuy and I (but mostly SomethingGuy's doing) put together.

Anyways, it automatically finds Warcraft III's install directory and builds the registry accordingly. To use it, just download, open the zip, then run the exe. Simple as that.

If you want the source code, feel free to ask and I'll upload it.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 22nd, 2009, 2:39 am
by DarkNemesis
Thanks, but what does it do? Help me find/install patches n' such?

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 22nd, 2009, 3:21 am
by Discombobulator
AVG found a virus.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 22nd, 2009, 4:19 am
by Perhaps
Funny, because I did an AVG scan before uploading, and it found nothing.

I suppose I should let the code speak for itself?

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

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 22nd, 2009, 3:45 pm
by Something
DarkNemesis wrote:Thanks, but what does it do? Help me find/install patches n' such?
What it does is it scans through every readable drive on your computer until it either finds your Warcraft 3 directory, or until it runs out of drives to scan. If it finds your Warcraft 3 directory, it then builds all of the needed registry entries to play Warcraft 3.

If you have a Warcraft 3 directory with all of the needed files, then after running this program you should be able to do the following things with Warcraft 3: run it, patch it, and of course connect to Battle.net, and do everything else Warcraft 3 does.

It was Perhap's idea to make this, I just used my familiarity to get the scanning to work without giving problems. The code was tossed between us a few times, so it looks a bit ugly, but it should work just fine.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 24th, 2009, 12:31 am
by Perhaps
Kind of a bump... Did you try it Dark, if so can you patch?

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 24th, 2009, 1:01 am
by DarkNemesis
Damn, forgot to. Been busy. I'll try it tomorrow.

Though I'm not sure what your intentions are...I.E. B-net games? Cuz there is still the question about my satellite internet. Still, we'll see.

In any event, thank ya! :P

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: April 25th, 2009, 12:27 am
by Perhaps
Assuming if the reason Battle.net can't patch is because it can't find the .exe because it's not listed in registry. Though it could just not like the version of Warcraft III.exe/Frozen Throne.exe you have. Which wouldn't surprise me since most no-cd cracking methods require you replace Warcraft III.exe and/or Frozen Throne.exe. So if the problem is not the registry, I could make another script that replaces your "bad ones" with the originals.

But if you don't trust my script, you can ask Yak who should know enough code to look at it to say rather it's bad or not. >_>

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 6th, 2009, 11:43 pm
by Waki_Miko
Perhaps wrote:

Code: Select all

; tl;dr (not really)
Had a quick glance at the code. Some quick questions:
1. What if, for whatever reason, there's a file named 'Warcraft III.exe' sitting around somewhere before the actual Warcraft III folder?
2. Also, what happens if you don't actually have a Warcraft III folder?
3. Line 25 (commented code?) looks like it could be discarded.

Then again, I'm totally unfamiliar with AutoHotKey, so I could be wrong about how things work. In which case, it would be valuable insight for me.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 7th, 2009, 1:08 am
by Perhaps
Well the chance of another file that's not Warcraft III that's "Warcraft III.exe" as a file name is pretty rare, except maybe if there were hash files. For anyone who can't find their directory, and don't do online activities up until this fixes I consider such a possibility as nill. If for some reason Warcraft III.exe is outside of its directory I don't believe it would work even with proper registry.

I've considered the possibilities, and I've considered them as pretty much negligible. Not really intended for an all out public release. But if someone wants to improve upon it, that's okay with me, the source is right there.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 7th, 2009, 7:47 pm
by Storamin
Discombobulator wrote:AVG found a virus.
well of course it would...

it's a file enacting changes on your registry... i'd be scared if AVG didn't find a virus.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 8th, 2009, 1:38 am
by Discombobulator
Storamin wrote:
Discombobulator wrote:AVG found a virus.
well of course it would...

it's a file enacting changes on your registry... i'd be scared if AVG didn't find a virus.
Someone's got a case of the dumbs today.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 9th, 2009, 10:02 am
by Storamin
Discombobulator wrote:
Storamin wrote:
Discombobulator wrote:AVG found a virus.
well of course it would...

it's a file enacting changes on your registry... i'd be scared if AVG didn't find a virus.
Someone's got a case of the dumbs today.
you have a case of the dumbs every day

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 12th, 2009, 10:15 pm
by Reaper
SNAP

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 13th, 2009, 6:43 am
by Discombobulator
Storamin wrote:
Discombobulator wrote:
Storamin wrote:
Discombobulator wrote:AVG found a virus.
well of course it would...

it's a file enacting changes on your registry... i'd be scared if AVG didn't find a virus.
Someone's got a case of the dumbs today.
you have a case of the dumbs every day
Every day I see you, that is.

Re: Warcraft III registry autobuild (Most Specifically for Dark)

Posted: May 15th, 2009, 9:12 am
by DarkNemesis
Every day I see you, that is.
This isn't even remotely funny