From bffeb08a86ae60a78714cce88667ef86a3be37b2 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 17 Sep 2021 13:20:46 +0100 Subject: [PATCH] Try to do a version check on installed VC redist. Refs #2359 * Unfortunately there isn't an easy registry key to check to see if the 2015-2019 redist that we need is installed. Instead we need to check the major/minor version to see if it's at least 14.20. * This is complicated by the fact that windows installer returns DWORD registry values with an extra # but provides no built-in way to strip it so it can be compared numerically. The solution we've used here is a custom vbscript action, but apparently they are problematic. Worst case I believe this will try to install the runtime when not necessary, which might require an unnecessary reboot. Or alternatively it may misdetect the runtime as installed but the large majority of people have a compatible redist so this isn't too bad either. --- util/installer/Installer32.wxs | 38 ++++++++++++++++++-- util/installer/Installer64.wxs | 64 +++++++++++++++++++++++++++++++--- 2 files changed, 96 insertions(+), 6 deletions(-) diff --git a/util/installer/Installer32.wxs b/util/installer/Installer32.wxs index 7a46a15ea..594ea8d22 100644 --- a/util/installer/Installer32.wxs +++ b/util/installer/Installer32.wxs @@ -312,6 +312,7 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -346,9 +379,10 @@ - + + - "0")]]> + "0" AND VCRT32MAJOR >= "14" AND VCRT32MINOR >= "20")]]> diff --git a/util/installer/Installer64.wxs b/util/installer/Installer64.wxs index 735a57788..3c9368dcb 100644 --- a/util/installer/Installer64.wxs +++ b/util/installer/Installer64.wxs @@ -338,6 +338,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -386,17 +441,18 @@ - + + - "0")]]> + "0" AND VCRT32MAJOR >= "14" AND VCRT32MINOR >= "20")]]> - + - "0")]]> + "0" AND VCRT64MAJOR >= "14" AND VCRT64MINOR >= "20")]]>