Use registry check for VC++ runtime detect

This commit is contained in:
2026-03-18 21:30:33 -06:00
parent b1f74094f1
commit 80c59795d7

View File

@@ -241,8 +241,14 @@ end;
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
function CheckVCInstall(): Boolean; function CheckVCInstall(): Boolean;
var
Installed: Cardinal;
begin begin
Result := FileExists(GetSysDir() + 'vcruntime140.dll');; Result := False;
if RegQueryDWordValue(HKLM64, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Installed', Installed) then
Result := Installed = 1
else if RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Installed', Installed) then
Result := Installed = 1;
end; end;
procedure UpdateVCRedistComponentState; procedure UpdateVCRedistComponentState;