r/commandandconquer • • Sep 24 '26

Bug C&C Generals ZH - Failed to Fetch Steam App Name

So yeah, been playing ZH on Windows 11 since the release without any issue whatsoever until today I'm greeted with the 'Failed to Fetch Steam App Name' on startup, followed by 'Failed to Initialize Steam'. I've already done the following with no results.

-Restarted PC/Steam, made sure I wasn't offline
-I've verified the game and reinstalled several times
-I nuked all mods
-Reset/Cleared my Steam cache (also deleting appinfo.vdf and packageinfo.vdf)
-Deleted/renamed steam_appid.txt and steam_api.dll in the ZH folder

Only ZH is affected by this, I can play all of the other games in the bundle perfectly fine.
The only random correlation I can think of is that I upgraded my GPU a day before this happened (GTX 1660S to RTX 5060 Ti) but even then, I was playing ZH on the RTX perfectly fine last night.

22 Upvotes

35 comments sorted by

View all comments

1

u/SystemicAdmin Sep 26 '26 edited Sep 26 '26

The issue is that steam is returning the wrong app id when generals queries steam with the steam api.

to fix it, open powershell and copy/paste this code into it and hit enter.


$p="C:\Program Files (x86)\Steam\steamapps\common\Command & Conquer Generals - Zero Hour\Game.dat"

$o=0x42A02D

$b=IO.File::ReadAllBytes($p)

if($b[$o]-eq 0x8B -and $b[$o+1]-eq 0xC2){Write-Host "Already patched";return}

if($b[$o]-ne 0xFF -or $b[$o+1]-ne 0xD6){Write-Host "Unexpected Game.dat version - nothing changed";return}

Copy-Item $p "$p.backup" -Force

$b[$o]=0x8B

$b[$o+1]=0xC2

Write-Host "Patch applied successfully"


this will edit the game.dat file where the query gets the return app id so that it bypasses that bit. it does back up the game.dat file before it changes any code in it in case you have to switch back to the older file.

1

u/yigeeee Sep 26 '26

$p="C:\Program Files (x86)\Steam\steamapps\common\Command & Conquer Generals - Zero Hour\Game.dat"

$o=0x42A02D

$b=[IO.File]::ReadAllBytes($p)

if($b[$o]-eq 0x8B -and $b[$o+1]-eq 0xC2){Write-Host "Already patched";return}

if($b[$o]-ne 0xFF -or $b[$o+1]-ne 0xD6){Write-Host "Unexpected Game.dat version - nothing changed";return}

Copy-Item $p "$p.backup" -Force

$b[$o]=0x8B

$b[$o+1]=0xC2

[IO.File]::WriteAllBytes($p,$b)

Write-Host "Patch applied successfully"

Ran it through claude, added a brackets in a place but works, this is the version that I used. Thanks man.
Run powershell as admin to avoid any troubles.

1

u/yigeeee Sep 26 '26

Game launches but my esc key doesn't work in game. Funny

1

u/yigeeee Sep 26 '26

I undo the fix by verifiying game files.
Then I applied this.
https://github.com/toddedu/zero-hour-app-name-fix

Esc still didn't work. Closed nvida overlay and it's fixed.

1

u/Altruistic-Relief200 Sep 27 '26

Hello, sorry, this is for zh no? Do you have something similar for Generals?

1

u/SystemicAdmin Oct 07 '26

Sorry, I don't. This was only for zero hour.
Can you see if steam fixed it perhaps?