Introduction
It’s COVID-19, Spring (sales), and Epic Games is still running an offensive “dumping” strategy against Steam on the video games market.
But still, let’s talk about Origin today, the EA’s games platform.
I (very simply) wanted to enjoy Spring sales by getting a legit copy of the highly recommended The Saboteur (2009) game.
This blog post has been written in English to higher its helping potential, nevertheless some screen-shots show French content as the target system is my personal setup here.
An History of Sadness
So after having get a license, I have been downloading this piece of software, and (simply) expecting it to work out-of-the-box as any legitimately owned game.
And at this very moment (last step of the installation process), we got the (sadly) famous error message :
Error: The .Net Framework redistributable package was not installed successfully. Setup cannot continue. (5100)
Let’s take a look to the installer log (C:\Program Files (x86)\Origin Games\The Saboteur\__Installer\InstallLog.txt
) :
The program to incriminate is this one : C:\Program Files (x86)\Origin Games\The Saboteur\__Installer\dotnet\dotnet35sp1\redist\dotnetfx35.exe
.
It’s actually an official .NET Framework 3.5 SP1 installer wizard shipped by the Origin team along with the game to meet required dependencies (SHA256 : 6ba7399eda49212524560c767045c18301cd4360b521be2363dd77e23da3cf36
).
Anyway, if you do try to install it manually, the wizard will “advise” you to use “Programs and Features” and “enable” it from there.
Actually, if you got on this blog post, you might have sadly noticed the feature is already enabled
What the EA team definitely missed is that, since October 2019, Micro$oft released .NET Framework 4.8 for Windows 7 SP1 (and above) through Windows Update (KB4503548). And it appears installing 3.5 on Windows 7 if this update is installed is broken.
So let’s trust Micro$oft when they say the 3.5.1 version is installed (from here : “.NET Framework [4.8] runs side-by-side with the .NET Framework 3.5 SP1”), and let’s try to “imitate” a successful installation of the latter.
One more issue, Origin bundles Touchup.exe
, a program being run by Origin itself to install the game and its requirements.
I imagine it refers to the respective Touchup.dat
file that should contain the dependencies list, but we can’t really open and edit such a BLOB, as we would maybe have done against a regular configuration file.
So, how could I possibly trick
Touchup
and make it think the .NET dependency is already anyhow satisfied ?
Yes nice catch, here is a solution.
Open up a commands prompt (as cmd.exe
or powershell.exe
), and navigate through your file system until you encounter an executable program (your Web browser main binary for instance).
Run it with the same parameters passed by Touchup
, close its GUI if one opened up, and check its exit code :
If the prompt prints 0
(or True
on PowerShell), stop right here : You got a candidate.
Copy the binary program as C:\PROGRA~1\ORIGIN~1\THESAB~1\__INST~1\dotnet\dotnet35sp1\redist\dotnetfx35.exe
(you should make a backup of the original dotnetfx35.exe
before).
Once it’s done, you may try to run the game installation from Origin again, and… surprise
But what if I can’t manage to find any program exiting with
0
?
It’s I.T., you can build your own using Code::Blocks for instance
Quicker solution, vlc.exe
(yes, the awesome video player from VideoLAN) is a candidate.
Paste the snippet above, compile it using the shipped-in MinGW, fetch the resulting .EXE under your newly created project’s release build directory and rename it as dotnetfx35.exe
.
Congratulations, you got your own .NET Framework 3.5 SP1 installer now :trollface:
Conclusion
So you’d have understood, here we worked around the installer non-modularity (and bug ?) by emulating a 0
exit code that would cause Touchup.exe
to successfully exit too, tricking Origin and making it set the game as correctly and fully-installed in its local database…
Before leaving and hoping that this piece of writing helped you, an advice for the EA development managers : If your launcher s*cks before AND after its rewrite, maybe it’s actually time to change the chair/keyboard middlewares (and rewrite it again), isn’t it ?