Detecting if the Visual Studio C++ Redistributable is installed

TL;DR: It’s worth not just detecting, but also trying out whether it actually works.

If you ship software on Windows written in C++ and compiled with the MSVC toolchain, then you probably heard about the so-called “Visual Studio C++ Redistributable”. Chances are that you link your binaries against the dynamic runtime DLLs, which means that your application has a runtime dependency of (at least some of the) DLLs contained in this redistributable package.

When your product is installed, you (or the installer framework you use) have to make sure that the appropriate version of the redistributable is also installed, or your program will fail to start. In this post, I’ll reason about why you shouldn’t settle for merely detecting whether this dependency is installed, with two real-world examples.

Continue reading “Detecting if the Visual Studio C++ Redistributable is installed”