Warcraft III registry autobuild (Most Specifically for Dark)

A place to talk about general WC3 and EotA related stuff.
Post Reply
Message
Author
User avatar
Perhaps
Retired
Retired
Posts: 811
Joined: September 14th, 2007, 1:24 am
Contact:

Warcraft III registry autobuild (Most Specifically for Dark)

#1 Post 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.
Attachments
WarcraftIIIAutoReg.zip
(199.69 KiB) Downloaded 251 times
Image

User avatar
DarkNemesis
Retired
Retired
Posts: 993
Joined: November 10th, 2008, 11:33 pm
Realm: Lordaeron (U.S. West)
Battle.net name: Dark_Nemesis

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

#2 Post by DarkNemesis »

Thanks, but what does it do? Help me find/install patches n' such?
Reaper: If you seriously think America is the best country ever you are brainwashed. Fact.
DarkNemesis: Reaper, you're an idiot.

User avatar
Discombobulator
Retired
Retired
Posts: 710
Joined: September 19th, 2006, 4:16 pm
Battle.net name: Karunecm
Contact:

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

#3 Post by Discombobulator »

AVG found a virus.
I'm this forum's MVP.

User avatar
Perhaps
Retired
Retired
Posts: 811
Joined: September 14th, 2007, 1:24 am
Contact:

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

#4 Post 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
Image

Something
Regular
Regular
Posts: 58
Joined: February 28th, 2007, 3:02 pm

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

#5 Post 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.
Something.

User avatar
Perhaps
Retired
Retired
Posts: 811
Joined: September 14th, 2007, 1:24 am
Contact:

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

#6 Post by Perhaps »

Kind of a bump... Did you try it Dark, if so can you patch?
Image

User avatar
DarkNemesis
Retired
Retired
Posts: 993
Joined: November 10th, 2008, 11:33 pm
Realm: Lordaeron (U.S. West)
Battle.net name: Dark_Nemesis

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

#7 Post 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
Reaper: If you seriously think America is the best country ever you are brainwashed. Fact.
DarkNemesis: Reaper, you're an idiot.

User avatar
Perhaps
Retired
Retired
Posts: 811
Joined: September 14th, 2007, 1:24 am
Contact:

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

#8 Post 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. >_>
Image

User avatar
Waki_Miko
Visitor
Visitor
Posts: 41
Joined: March 6th, 2009, 10:15 am
Location: Gensokyo

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

#9 Post 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.

User avatar
Perhaps
Retired
Retired
Posts: 811
Joined: September 14th, 2007, 1:24 am
Contact:

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

#10 Post 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.
Image

User avatar
Storamin
Addict
Addict
Posts: 454
Joined: May 2nd, 2007, 2:35 pm
Realm: Azeroth (U.S. East)
Location: USA or Germany

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

#11 Post 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.
Image

User avatar
Discombobulator
Retired
Retired
Posts: 710
Joined: September 19th, 2006, 4:16 pm
Battle.net name: Karunecm
Contact:

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

#12 Post 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.
I'm this forum's MVP.

User avatar
Storamin
Addict
Addict
Posts: 454
Joined: May 2nd, 2007, 2:35 pm
Realm: Azeroth (U.S. East)
Location: USA or Germany

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

#13 Post 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
Image

User avatar
Reaper
Retired
Retired
Posts: 647
Joined: December 20th, 2007, 3:00 pm
Realm: Azeroth (U.S. East)
Battle.net name: Reaper777

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

#14 Post by Reaper »

SNAP
[Reaper]

User avatar
Discombobulator
Retired
Retired
Posts: 710
Joined: September 19th, 2006, 4:16 pm
Battle.net name: Karunecm
Contact:

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

#15 Post 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.
I'm this forum's MVP.

User avatar
DarkNemesis
Retired
Retired
Posts: 993
Joined: November 10th, 2008, 11:33 pm
Realm: Lordaeron (U.S. West)
Battle.net name: Dark_Nemesis

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

#16 Post by DarkNemesis »

Every day I see you, that is.
This isn't even remotely funny
Reaper: If you seriously think America is the best country ever you are brainwashed. Fact.
DarkNemesis: Reaper, you're an idiot.

Post Reply