Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Game updates cause error dialog #29

Open
2E0PGS opened this issue Oct 31, 2018 · 8 comments
Open

BUG: Game updates cause error dialog #29

2E0PGS opened this issue Oct 31, 2018 · 8 comments

Comments

@2E0PGS
Copy link

2E0PGS commented Oct 31, 2018

First,
Great little tool works well as a launcher proxy.

Second,
When I launched BOPS4 today the battle.net wasn't open so this program launched it great! However the game needed updates which it then proceeded to download 4GB worth and install them. However this program didn't seem to be aware the game was updating and instead gave me the following error:
image

Perhaps it would be possible to check if the game updater process/exe is running and wait?

@2E0PGS
Copy link
Author

2E0PGS commented Oct 31, 2018

Luckily I waited until updates completed before clicking OK on that dialog as it did kill the bnet launcher after pressing OK.

@dafzor
Copy link
Owner

dafzor commented Oct 31, 2018

The battle.net client is the one doing the update so there's really no easy way to check if a game is updating or not.

I really didn't account for updates has I usually leave the battle.net client running, so will improve the message to allow waiting for the update to complete.

Has for doing it automatically, maybe i could hook into battle.net client agent and try and look what files it has open to deduce if it's updating, so I'll try to look into it for a later version.

@dafzor
Copy link
Owner

dafzor commented Nov 1, 2018

Partially address in 3323f1b which fixes teh bug part of it. There's a new pre-release 2.01 version with those changes.

As for the enhancement of detecting updates only way so far seems to doing kernel calls which are windows version dependent.

@reed216
Copy link
Contributor

reed216 commented Nov 2, 2018

You can pull update information from the ".patch.result" files in the game install directory (it's a hidden file) 0 means the game is up to date, I don't know what value it's set to for preload updates. Will check when the 8.1 WoW prepatch is scheduled. As for finding game install directories, either I’m not looking far enough, or blizzard are hiding it. This has been the main reason I never looked at submitting a pull for this since I’m going off hardcoded values at the moment.

@dafzor
Copy link
Owner

dafzor commented Nov 2, 2018

@iMintty yeah, I suspect it's stored in C:\ProgramData\Battle.net\Agent\product.db but seems to be a internal struct dumped into a file.

There's also the case when the client itself might be updating, but it seems the "C:\ProgramData\Battle.net\Agent" folder also has a ".patch.result" so that might be an option (assuming it's the only place that gets updated.

So I think you might be onto something, if product.db is made properly readable it would be possible to match launch command with a path and search for the patch status.

A big unknown is how it changes during the launch process, could I just check it once the client is running? would i need to keep looking at while checking if the game is running? I don't know.

Regardless, implementing patch detection seems a lot more feasible.

@dafzor
Copy link
Owner

dafzor commented Nov 15, 2018

Leaving this note mostly for myself.

Tried to make some sense of products.db using a hex editor and binary templates but couldn't make sense of it. Managed to figure out strings where prefixed by a byte with their length but that's about it, no idea what the terminator byte is supposed to signal.

Attaching the binary template of the bit I uncovered. bnet_product.bt.txt

@dafzor
Copy link
Owner

dafzor commented Aug 14, 2019

product.db is in the protobuf format, schema has been decoded by other projects.

@dafzor
Copy link
Owner

dafzor commented Sep 19, 2019

After some testing i concluded that the .patch.result does not update in realtime when the game has an update. So it seems an unreliable method of verifying if it's updating or not.

@dafzor dafzor removed their assignment Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants