From 841efaeeddcc6f5eeb0e785e3e5d4cf9509fa1a6 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Thu, 22 Apr 2021 17:00:06 +0300 Subject: [PATCH] Installer: Check that VC Redist x86 exists. --- deploy/FortFirewall.iss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deploy/FortFirewall.iss b/deploy/FortFirewall.iss index 79124b02..6b357961 100644 --- a/deploy/FortFirewall.iss +++ b/deploy/FortFirewall.iss @@ -77,8 +77,10 @@ Name: "{commondesktop}\{#APP_NAME}"; Filename: "{#APP_EXE}"; WorkingDir: "{app}" [Run] Filename: "{app}\driver\scripts\reinstall.bat"; Description: "Re-install driver"; Flags: runascurrentuser Filename: "sc.exe"; Parameters: "start {#APP_SVC_NAME}"; Description: "Start service"; Flags: runascurrentuser nowait + Filename: "https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads"; \ - Description: "Visual C++ x86 redistributable"; Flags: shellexec postinstall + Description: "Install the latest Visual C++ x86 redistributable!"; Flags: shellexec postinstall; \ + Check: not VCRedist86Exists() [UninstallRun] Filename: "{#APP_EXE}"; Parameters: "-u"; RunOnceId: "DelProvider"; Flags: runascurrentuser @@ -105,3 +107,8 @@ function LanguageName(Param: String): String; begin Result := ActiveLanguage; end; + +function VCRedist86Exists(): Boolean; +begin + Result := FileExists(ExpandConstant('{syswow64}\vcruntime140.dll')); +end;