[LyX/master] Wininstaller, fix bug where previous installations, with emergency version greater than 1, could not be seen in registry on overinstall
Eugene Chornyi
yu_jin at lyx.org
Tue Jul 7 18:49:53 UTC 2020
commit 32e501a282a3c9e83181979c32bf9b9cde79e43f
Author: Eugene Chornyi <yu_jin at lyx.org>
Date: Tue Jul 7 21:13:34 2020 +0200
Wininstaller, fix bug where previous installations, with emergency version greater than 1, could not be seen in registry on overinstall
---
.../Win32/packaging/installer/include/init.nsh | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/development/Win32/packaging/installer/include/init.nsh b/development/Win32/packaging/installer/include/init.nsh
index 76bacd5..bdbb495 100644
--- a/development/Win32/packaging/installer/include/init.nsh
+++ b/development/Win32/packaging/installer/include/init.nsh
@@ -660,13 +660,17 @@ Function .onInit
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
# also check for an emergency release
${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}
${else}
ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
# also check for an emergency release
${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}
${if} $0 != ""
More information about the lyx-cvs
mailing list