Currently our installer, if you attempt to install to the same location that the application already is installer to the NEXT button is greyed out on the the "Choose Install Location" page. If you change the directory the NEXT button is available. Working as intended.
The ask from QA is to have some sort of message pop up to indicate that this is why the button is greyed out. This is what I have now, adding in the message box:
But what is happening is on the page prior, Region select, once I select NEXT the message pops up before moving to the Install page - and then it pops up again once the Install page loads.Function .onVerifyInstDir
InstallHash::hash $INSTDIR
Pop $Sha1hash
ReadRegStr $VerifyInstallDirectory HKCU "Software\{#ProjectInternalName}_$Sha1hash" ""
;no duplicate installation paths
StrCmp $INSTDIR $VerifyInstallDirectory 0 PathGood1
; MessageBox MB_OK|MB_TOPMOST|MB_SETFOREGROUND|MB_ICONSTOP "An installation already exists at '$INSTDIR'. Please select another directory."
MessageBox MB_OK|MB_TOPMOST|MB_SETFOREGROUND|MB_ICONSTOP "An installation already exists at '$INSTDIR'. Please select another directory."
Abort
PathGood1:
; no double back slashes
${WordFind} "$INSTDIR" "\\" "*" $R0
StrCmp $R0 "$INSTDIR" PathGood3 0
;MessageBox MB_OK|MB_TOPMOST|MB_SETFOREGROUND|MB_ICONSTOP "double backslash"
Abort
Pathgood3:
FunctionEnd:
I am not sure what the best answer is here. Looking for suggestions. Is there a way to put a tooltip on the greyed out button only?
Thanks for any and all help/suggestions.
Ginn