24 lines
865 B
NSIS
24 lines
865 B
NSIS
!include "FileFunc.nsh"
|
|
|
|
!macro NSIS_HOOK_POSTINSTALL
|
|
ReadRegDWord $0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" "Installed"
|
|
${If} $0 == 1
|
|
DetailPrint "Visual C++ Redistributable already installed"
|
|
Goto vcredist_done
|
|
${EndIf}
|
|
|
|
${If} ${FileExists} "$INSTDIR\resources\vc_redist.x64.exe"
|
|
DetailPrint "Installing Visual C++ Redistributable..."
|
|
CopyFiles "$INSTDIR\resources\vc_redist.x64.exe" "$TEMP\vc_redist.x64.exe"
|
|
ExecWait '"$TEMP\vc_redist.x64.exe" /install /quiet /norestart' $0
|
|
${If} $0 == 0
|
|
DetailPrint "Visual C++ Redistributable installed successfully"
|
|
${Else}
|
|
MessageBox MB_ICONEXCLAMATION "Visual C++ installation failed. Some features may not work."
|
|
${EndIf}
|
|
Delete "$TEMP\vc_redist.x64.exe"
|
|
Delete "$INSTDIR\resources\vc_redist.x64.exe"
|
|
${EndIf}
|
|
|
|
vcredist_done:
|
|
!macroend
|