Wininstaller, fix bug where previous installations, with emergency version greater than 1, could not be seen in registry on overinstall

This commit is contained in:
Eugene Chornyi 2020-07-07 21:13:34 +02:00
parent 95fcc42802
commit c93b3a24a0
2 changed files with 8 additions and 3 deletions

View File

@ -651,13 +651,17 @@ Function .onInit
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion" ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
# also check for an emergency release # also check for an emergency release
${if} $0 == "" ${if} $0 == ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion" ${For} $7 0 20
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5$7" "DisplayVersion"
${Next}
${endif} ${endif}
${else} ${else}
ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion" ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
# also check for an emergency release # also check for an emergency release
${if} $0 == "" ${if} $0 == ""
ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion" ${For} $7 0 20
ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5$7" "DisplayVersion"
${Next}
${endif} ${endif}
${endif} ${endif}
${if} $0 != "" ${if} $0 != ""

View File

@ -87,4 +87,5 @@ What's new
* BUILD/INSTALLATION * BUILD/INSTALLATION
- Wininstaller, fix bug where previous installations, with emergency version
greater than 1, could not be seen in registry on overinstall