• Welcome to Valhalla Legends Archive.
 

Windows Registry: Battle.net

Started by soccerist, June 27, 2005, 12:54 AM

Previous topic - Next topic

soccerist

Does anyone happen to have any references to the keys, values and value data fields that Starcraft uses in the Windows System Registry?

I'm writing an app that will auto-populate some of the fields' default values in Starcraft with custom settings of my own.  Specifically, the one I've been trying to find is the key/value for the default "Game name" field when the user clicks on the Join button, to join a game. 

I remember using a program someone made a few years ago (4 or 5 years ago?) that would auto-populate that field with custom values, but I no longer remember or have any references to it.  I would have thought it was manipulations of registry settings and surely not manual event/key injections.

My original guess (which is incorrect) was:
My Computer\HKEY_CURRENT_USER\Software\Battle.net\Recent Games\

Thanks for any help!


Tazo

HKEY_CURRENT_USER\Software\Blizzard Entertainment\Starcraft\Last Created Game Name

soccerist

Quote from: Tazo on June 27, 2005, 11:08 AM
HKEY_CURRENT_USER\Software\Blizzard Entertainment\Starcraft\Last Created Game Name

No, that's the one for when you click 'Create' to create a game.  I'm looking for the one that shows up when you click 'Join'.

MyndFyre

Get Regmon from Sysinternals and see what's done there.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

soccerist

Quote from: MyndFyre on June 27, 2005, 05:38 PM
Get Regmon from Sysinternals and see what's done there.
Wow, thanks.  That program is amazing!

Well folks, I have solved my problem!  Valhalla Legends comes to the rescue once again.   ;D  It turns out that I was looking in the correct spot... sort of.  Here's what I've learned:

The recently-joined-game Windows Registry field:

Key:   HKEY_CURRENT_USER\Software\Battle.net\Recent Games\
Value:  A 16-character string  (see note below***)
Value-data:  The recently joined game as a unicode string.

***Now, the value field stumped me for a second, but then I realized what it was.  If you divide the string into substrings of 2 characters each, and take each of those two characters to represent a hexidecimal byte, it all becomes clear.  The first 4 bytes are the product ID (SEXP, STAR, etc.) and the next 4 is the byte-code for the product.

Why it didnt' work when I was doing my tests is because I was modifying the right Key, wrong Value's value-data.  I have a SEXP entry with 0xcb, a SEXP entry with 0xc9, and a STAR entry with 0xc9.  That means that I have registry entries stored for Starcraft (no expansion), Broodwar (logged in as regular starcraft), and Broodwar (logged in as broodwar). 

Hope this is enlightening to someone else that is trying to do what I'm doing!


---

Finally, unrelated:

Does [vL] have an area where forum members may upload or post links to their released projects (bots, apps) for others to use/try? 

I wouldn't mind releasing code for my Battle.net bot, chat client, and this new GUI app that I'm making.  I'd like to see it useful to others.



soccerist

Actually, I believe I'm wrong about the 0xcb vs 0xc9 thing.  0xc9 was the byte version used in an older version of sc/bw?  It looks like it's only writing to values ending in 0xcb now...

I think I remember having to deal with this when I wrote my bot.  Bnet changed it from 0xcb to 0xc9 and then back to 0xcb.  Can someone clarify this?

UserLoser.

Quote from: soccerist on June 28, 2005, 01:53 AM
Actually, I believe I'm wrong about the 0xcb vs 0xc9 thing.  0xc9 was the byte version used in an older version of sc/bw?  It looks like it's only writing to values ending in 0xcb now...

I think I remember having to deal with this when I wrote my bot.  Bnet changed it from 0xcb to 0xc9 and then back to 0xcb.  Can someone clarify this?

Pretty sure it never decreased in value at any time.

Spilled

Agreed, the value never changed back and forth -.-

Kp

Quote from: soccerist on June 28, 2005, 01:53 AM
Actually, I believe I'm wrong about the 0xcb vs 0xc9 thing.  0xc9 was the byte version used in an older version of sc/bw?  It looks like it's only writing to values ending in 0xcb now...

I think I remember having to deal with this when I wrote my bot.  Bnet changed it from 0xcb to 0xc9 and then back to 0xcb.  Can someone clarify this?

I believe the name is composed of product ID + magic version, so every time you go to a new patch, you go also to a new value name.

As for uploads: no, we don't have any place in particular because not enough people do it.  Afaik, there's no policy forbidding posting it (assuming you don't go spamming it in every forum, of course ;)).
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

soccerist

Well, here's my app.  It's called BnetSpy.  Let me know what you think.

The project website is:
http://contour.homeip.net:8000/bnetspy/



Note:  Using port 8000 because my ISP is gay and blocks port 80.

Warrior

Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

soccerist

Quote from: Warrior on June 30, 2005, 02:45 AM
Not bad, seems pretty handy.

Thanks Warrior.  :)


Ah, too bad I don't know how to track download counts with Apache...

Kp

Quote from: soccerist on June 30, 2005, 07:38 PM
Ah, too bad I don't know how to track download counts with Apache...

If you have access to the server logs (assuming it's writing them!), you could grep for the URL of the package(s).  It's inelegant, but it works. :)
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!