Win installer: added additional validation into uninstaller for cases when uninstaller was moved from product folder by some reason and then it was run.

This commit is contained in:
Vladimir.Orlov
2017-12-28 17:07:56 +03:00
parent 61504fe283
commit b7ec0ad9ee
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -1045,11 +1045,17 @@ HKLM:
cant_find_installation:
;admin perm. is required to uninstall?
${If} ${RunningX64}
look_at_program_files_64:
${UnStrStr} $R0 $INSTDIR $PROGRAMFILES64
StrCmp $R0 $INSTDIR HKLM look_at_program_files_32
${Else}
look_at_program_files_32:
${UnStrStr} $R0 $INSTDIR $PROGRAMFILES
StrCmp $R0 $INSTDIR HKCU uninstaller_relocated
${EndIf}
StrCmp $R0 $INSTDIR HKLM HKCU
uninstaller_relocated:
MessageBox MB_OK|MB_ICONEXCLAMATION "$(uninstaller_relocated)"
Abort
Done:
FunctionEnd
+1
View File
@@ -18,5 +18,6 @@ LangString current_version_already_installed ${LANG_ENGLISH} "Current version of
LangString uninstall_previous_installations_title ${LANG_ENGLISH} "Uninstall old versions"
LangString uninstall_previous_installations ${LANG_ENGLISH} ""
LangString uninstall_previous_installations_prompt ${LANG_ENGLISH} "Select the ${MUI_PRODUCT} version$2 that you want to uninstall."
LangString uninstaller_relocated ${LANG_ENGLISH} "Uninstall hasn't detected folder of ${MUI_PRODUCT} installation. Probably uninstall.exe was moved from the installation folder."
LangString empty_or_upgrade_folder ${LANG_ENGLISH} "Please select an empty folder."
LangString application_running ${LANG_ENGLISH} "$INSTDIR is running. Close the application and retry the installation."