fix: handle older VC redist versions (#5447)
This commit is contained in:
@@ -120,15 +120,15 @@ begin
|
||||
Result := VCRTVersion + ' is installed';
|
||||
end;
|
||||
|
||||
// Checks if a new VCRT is needed by comparing the builds.
|
||||
// Checks if a new VCRT is needed by comparing the minor version (the major one is locked at 14).
|
||||
function NeedsNewVCRT(): Boolean;
|
||||
var
|
||||
VCRTBuild: Cardinal;
|
||||
begin
|
||||
Result := True;
|
||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Bld', VCRTBuild) then
|
||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Minor', VCRTBuild) then
|
||||
begin
|
||||
if VCRTBuild >= {#SHIPPED_VCRT_BUILD} then
|
||||
if VCRTBuild >= {#SHIPPED_VCRT_MINOR} then
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user