Detect version of VC Redist in Inno Setup

For SoundSwitch, I needed to fix a bug where the installer wasn’t detecting correctly the version of VC Redist C++ installed.

As I found on Stack Overflow, each version has it’s own MSI key in the registry, but this is impossible to use since at each update of the VC Redist you need to find the new registry key and check for it.

However, I found this excellent post explaining where in the registry you can find if the wanted version is installed. The best part, the build is also present at the key given.

With that information at hand, I had all I needed to future proof my installer, and I’m happy to share with you the script I wrote for Inno Setup.

Antoine Aflalo Written by:

2 Comments

  1. M Rea
    2nd January 2017
    Reply

    Hi, did you post somewhere the [Run] part of the Inno Script?

Leave a Reply

Your email address will not be published. Required fields are marked *