Installing Traintastic on Windows 10/11

Hi,

we have had another problem with the missing vc 14 redis after installation of Traintastic ( a user in H0-Modellbahnforum). I suspect that the version check in traintastic.iss doesn’t always work properly.

function VC2019RedistNeedsInstall: Boolean;
var
  Version: String;
begin
  if RegQueryStringValue(HKEY_LOCAL_MACHINE,
       'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Version', Version) then
  begin
    // Is the installed version at least 14.24 ?
    Log('VC Redist Version check : found ' + Version);
    Result := (CompareStr(Version, 'v14.24.28127.04')<0);
  end
  else
  begin
    // Not even an old version installed
    Result := True;
  end;
  if (Result) then
  begin
    ExtractTemporaryFile('vc_redist.x64.exe');
  end;
end;

The user has 9 different redis versions installed. The function expects, that the version string has exactly the format vxx.xx.xxxxx.x. If the format of the version string differs, we could have a problem.

The vc_redist has a own version check, so I suggest to change the installer and always install the vc_redist.

Change this:

[Run]
Filename: “{tmp}\vc_redist.x64.exe”; StatusMsg: “Installing VC++ redistributables…”; Parameters: “/quiet /norestart”; Check: VC2019RedistNeedsInstall; Flags: waituntilterminated

To:

[Run]
Filename: “{tmp}\vc_redist.x64.exe”; StatusMsg: “Installing VC++ redistributables…”; Parameters: “/install /quiet /norestart”; Flags: waituntilterminated

Greetings, Tom

Moin Tom,

Thanks for the headsup, I just downloaded the latest version from aka.ms/vc14/vc_redist.x64.exe it has version number 14.51.36231.0. I’ll update the build system to always use the latest, that should help. But first time to sleep :zzz:

Greetings,
Reinder

Moin Tom,

Adjusted the GitHub Actions pipeline, it now always downloads the latest VC Redist from Microsoft and uses that version number as test. That should resolve the issue :slight_smile:

Fix is available in Build #2044.

Greetings,
Reinder