Continue with install if old installer fails

User may have manually removed files, or the installation may be corrupt.

https://forums.ankiweb.net/t/installing-anki-when-there-seems-to-be-a-previous-version/30621
This commit is contained in:
Damien Elmes 2023-05-29 15:07:44 +10:00
parent 921e8c7985
commit 489f0fd066

View file

@ -170,10 +170,18 @@ Section ""
${IF} $0 != "" ${IF} $0 != ""
; old value exists, we want to inform the user that a manual uninstall is required first and then start the uninstall.exe ; old value exists, we want to inform the user that a manual uninstall is required first and then start the uninstall.exe
MessageBox MB_ICONEXCLAMATION|MB_OK "A previous Anki version needs to be uninstalled first. After uninstallation completes, please run this installer again." MessageBox MB_ICONEXCLAMATION|MB_OK "A previous Anki version needs to be uninstalled first. After uninstallation completes, please run this installer again."
ClearErrors
ExecShell "open" "$0\uninstall.exe" ExecShell "open" "$0\uninstall.exe"
IfErrors shellError
Quit Quit
${ELSE}
goto notOldUpgrade
${ENDIF} ${ENDIF}
shellError:
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to uninstall the old version of Anki. Proceeding with installation."
notOldUpgrade:
Call removeManifestFiles Call removeManifestFiles
; Set output path to the installation directory. ; Set output path to the installation directory.