ODBCQueryTool icon indicating copy to clipboard operation
ODBCQueryTool copied to clipboard

"Another version installed" on clean system

Open cmjdiff opened this issue 1 year ago • 1 comments

On two systems that have not had your tool installed, I am prompted whether to overwrite a previous installation, even though none exists.

I had wondered whether George Poulose's QTODBC was related, but while one of these two machines has that installed, but the other does not.

cmjdiff avatar May 12 '24 21:05 cmjdiff

I'm experiencing also this behaviour. The logic in the NSIS script requires some changes.

GStegemann avatar May 21 '24 14:05 GStegemann

This would fix the "Another version installed" prompt:

diff --git a/Installer/Installer_Algemeen.nsh b/Installer/Installer_Algemeen.nsh
index bdd2cd7..f88982d 100644
--- a/Installer/Installer_Algemeen.nsh
+++ b/Installer/Installer_Algemeen.nsh
@@ -6,12 +6,12 @@
 ; Copyright (c) 2017 ir. W.E. Huisman
 ; All rights reserved
 ;
-; Last change:       30-11-2023
+; Last change:       30-11-2023 / 29-05-2024
 ; Versionnumber:     3.4.1
 ;-------------------------------------------------------
  !define PRODUCT_NAME                         "OpenODBCQuerytool"
  !define PRODUCT_VERSION                      "3.4.1"
- !define PRODUCT_BUILDNUMBER                  "395"
+ !define PRODUCT_BUILDNUMBER                  "396"
  !define PRODUCT_PUBLISHER                    "EDO"
  !define PRODUCT_WEB_SITE                     "https://sourceforge.net/projects/odbcquerytool"
  !define PRODUCT_DIR_REGKEY                   "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}"
@@ -198,6 +198,7 @@ Function .onInit
 
 ;Check if there is a newer version of the product
  Readregstr $currentVersion "${PRODUCT_UNINST_ROOT_KEY}" "${PRODUCT_UNINST_KEY}" "DisplayVersion"
+ StrCmp $currentVersion "" doInstallAfterAll 0  ; In case not yet installed at all
  StrCmp $currentVersion "${PRODUCT_VERSION}.${PRODUCT_BUILDNUMBER}" versionTheSame alreadyInstalled
 
  versionTheSame:

GStegemann avatar May 29 '24 12:05 GStegemann

Thank you for the fix. Will be used in the next version 3.4.2, coming next week.

edwig avatar May 30 '24 18:05 edwig