MAINT-3575: remove old exe if found in current install directory

master
Oz Linden 2013-12-11 17:43:55 -05:00
parent 69dfa3507a
commit 35add2252b
1 changed files with 18 additions and 0 deletions

View File

@ -301,6 +301,23 @@ Function CheckNetworkConnection
Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Function CheckOldExeName
; Viewer versions < 3.6.12 used the name 'SecondLife.exe'
; If that name is found in the install folder, delete it to invalidate any
; old shortcuts to it that may be in non-standard locations, so that the user
; does not end up running the old version (potentially getting caught in an
; infinite update loop). See MAINT-3575
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckOldExeName
IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE
CHECKOLDEXE_FOUND:
Delete "$INSTDIR\SecondLife.exe"
CHECKOLDEXE_DONE:
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Function CheckWillUninstallV2
@ -923,6 +940,7 @@ Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this v
Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
Call CheckWillUninstallV2 ; See if a V2 install exists and will be removed.
Call CheckOldExeName ; Clean up a previous version of the exe
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE