dafzor / bnetlauncher

Launcher utility to help start battle.net games with the steam overlay.
http://madalien.com/stuff/bnetlauncher/
GNU General Public License v3.0
224 stars 24 forks source link

Modern Warfare II does not launch properly #84

Open JonJaded opened 1 year ago

JonJaded commented 1 year ago

My issue is very much like #76 I am also on Windows 11 and im running into issues where the launcher does not open the game at all.

How it looks in task manager image

One thing I do notice is that the anti cheat screen doesn't come up at all, and as I'm typing this, I think I know what the issue is. I think there's some sort of check or Ricochet check that the game is looking for (to make sure its open) and the cod.exe game fails to launch because of its absense.

JonJaded commented 1 year ago

Okay after messing around and checking stuff, when the game launches through the play button, it's launched with the following arguments:

image Whats partly hidden is a 24-alpha numeric code (not sure if unique) Edit: It is not unique. What's hidden is "cod.exe -uid auks hdeyguxs3zaumvlgvybm2vyc"

And these are the arguements when launching via bnetlauncher:

image We lose the -uid, the game descriptor and the 24-char code is reduced to 4, and fails to launch.

When I launch other games like COD Cold War, the arguements match 1:1, and both launch perfectly.

About this ID though, I'm not sure if it's specific to a machine or an account or if it's static. I can maybe check with a friend in a couple of hours.

Edit: I searched it up and it's a static identifier, nothing special.

dafzor commented 1 year ago

bnetlauncher should detected the exe from the launcher and just copy the parameters as is to relaunch it under steam so it should always be 1:1.

If there's a difference I can only guess two things:

  1. The game launching multiple cod.exe and bnetlauncher picking up the wrong one
  2. The game is doing something to confuse bnetlauncher (anti cheat protections?)

There's already code to stop 1 from happening, and there's not much that could be done about 2 without going into dangerous territory.

JonJaded commented 1 year ago

Okay well, holy shit. I just accidentally found a workaround to launch the game without bnetlauncher and even without battlenet.

Create a shortcut of the cod.exe located in [gamedir]\_retail_\ folder and add the following launch parameters to it

"C:\Games\Call of Duty\_retail_\bootstrapper.exe" -uid auks

It shows the Richochet anticheat splashscreen, and the game launches. My battlenet info is passed through perfectly fine despite it never opening. I have no idea why this works, as it doesn't work with any of the other COD games, or any other game on battlenet at all.

If I were to guess, I'd say it's because this is the first COD in 4 years to be multistore front on PC so they didn't tie their Blizzard launcher stub into the executable. See how great the PC space can be without needless DRM?

Edit: Leaving this topic open as this is something I can see Activision breaking on purpose in the future.

Edit2: After restarting my PC, it seems to not work. But I can report this, I found out that the cod.exe game runs underneath the bootstrapper.exe which is also another executable in the folder. I'll do some more testing tomorrow when I have time.

Edit3: Found out why it wasn't working; It's NOT cod.exe that needs to launched, it's bootstrapper.exe This bootstrapper passes information (and likely does an anticheat check) and then opens the process cod.exe with the parameters -uid auks hdeyguxs3zaumvlgvybm2vyc (just as I've written before.) Tons of moving parts in this launch process.

Edit4: Okay this is just beyond me. Sometimes launching cod directly with the parameters I wrote above works, and sometimes it doesn't. The bootstrapper method works for my streamdeck but not as a standard shortcut in a folder. I'm losing it here, and admittedly my environment isn't as clean as it should be for doing this.

JonJaded commented 9 months ago

Sorry to necro a year old post, but I'm back again. I also found out the trick to this is the run it again while bnet launcher is open.

A command script like this works perfectly.

"C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe" --exec="launch AUKS"
timeout /t 10 /nobreak
"C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe" --exec="launch AUKS"
exit

First line opens battle net to the COD HQ page, second waits for however long it takes to actually get battlenet to open (adjustable) third line actually opens the game, unlike previous CODs this one wants two calls to open, which is what's missing from the current implementation, and last one exits.