Install Visual Studio Redistributable with NSIS

This commit is contained in:
Alex Spataru 2021-01-13 21:29:49 -05:00 committed by GitHub
parent f12ce3f5c3
commit d587e99cee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ ManifestDPIAware true
InstallDir "${INSTALL_DIR}" InstallDir "${INSTALL_DIR}"
RequestExecutionLevel admin RequestExecutionLevel admin
OutFile "${EXECNAME}-${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}-Windows.exe" OutFile "${EXECNAME}-${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}-Windows.exe"
Function .onInit Function .onInit
setShellVarContext all setShellVarContext all
!insertmacro VerifyUserIsAdmin !insertmacro VerifyUserIsAdmin
@ -88,6 +88,8 @@ Section "${APPNAME} (required)" SecDummy
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMinor" ${VERSIONMINOR} WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMinor" ${VERSIONMINOR}
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoRepair" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoRepair" 1
ExecWait '${INSTALL_DIR}\vc_redist.x64' /q
SectionEnd SectionEnd
Section "Start Menu Shortcuts" Section "Start Menu Shortcuts"