Skip running vc_redist.x64.exe if it's already installed (#2733)

This commit is contained in:
Wojtek Mach 2024-08-06 15:02:28 +02:00 committed by GitHub
parent 6a45f168ba
commit 90405e402f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,15 @@ Section "Install"
SetOutPath "$INSTDIR"
File "bin\vc_redist.x64.exe"
; Check if the redistributable is installed
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" "Installed"
${If} $0 == 1
DetailPrint "Visual C++ Redistributable is already installed. Skipping installation."
${Else}
DetailPrint "Visual C++ Redistributable is not installed. Installing now..."
ExecWait '"$INSTDIR\vc_redist.x64.exe" /install /quiet /norestart'
${EndIf}
Delete "$INSTDIR\vc_redist.x64.exe"
File /a /r "bin\Livebook-Release\"