A missing blog post image


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) :

Install Date: 04/12/2020
12:28:18  Started logging

12:28:18  Install Location: C:\Program Files (x86)\Origin Games\The Saboteur\
12:28:18  [...]
12:28:18  Touchup not running under compatibility mode
12:28:18  [...]
12:28:18  Processing EAIN file 'C:\PROGRA~1\ORIGIN~1\THESAB~1\__INST~1\Touchup.dat'.
12:28:18  Installation registry missing.  Game not yet installed.
12:28:18  (Config)Studio: Electronic Arts
12:28:18  (Config)Game Name: The Saboteur
12:28:18  (Config)Display Game Name: The Saboteur
12:28:18  (Config)Updating ForceUninstallAllFiles to: 0
12:28:18  (Config)Updating ForceUninstallAllFiles to: 1
12:28:18  EAI data version:
12:28:18  [...]
12:29:53  Started DotNet runtime install phase for: dotnet35sp1
12:29:53  Launching process:
    Command: "C:\PROGRA~1\ORIGIN~1\THESAB~1\__INST~1\dotnet\dotnet35sp1\redist\dotnetfx35.exe" /q /norestart
    Working directory: C:\PROGRA~1\ORIGIN~1\THESAB~1\__INST~1\dotnet\dotnet35sp1\redist\
12:29:53  Process exited with exit code 5100.
12:29:53  Error installing DotNet runtime.
12:31:45  Installer finished with exit code: 1
12:31:45  Shutting down data reader.

12:31:45  Stopping install logging

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.

A missing blog post image

Actually, if you got on this blog post, you might have sadly noticed the feature is already enabled :joy:

A missing blog post image

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.

A missing blog post image

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.

A missing blog post image

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 :

cd .\a\windows\directory\path
\.program_name.exe /q /norestart
echo %errorlevel%

If the prompt prints 0, 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 :tada:

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 :wink:

#include <stdio.h>

int main(int argc, const char* argv[])
    printf("I\'m about to trick Touchup !");

    return 0;

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:


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 ?