From 80c59795d7da87cc1c2c99bb4945826145fffb6e Mon Sep 17 00:00:00 2001 From: deepend-tildeclub Date: Wed, 18 Mar 2026 21:30:33 -0600 Subject: [PATCH] Use registry check for VC++ runtime detect --- win32/installer/zoitechat.iss.tt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/win32/installer/zoitechat.iss.tt b/win32/installer/zoitechat.iss.tt index 871f95d4..a07e4aec 100644 --- a/win32/installer/zoitechat.iss.tt +++ b/win32/installer/zoitechat.iss.tt @@ -241,8 +241,14 @@ end; ///////////////////////////////////////////////////////////////////// function CheckVCInstall(): Boolean; +var + Installed: Cardinal; 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; procedure UpdateVCRedistComponentState;