Overwrite uninstaller
Hello,
I have a problem to overwrite my uninstaller.
I am working on an updater. This updater is overwriting/creating some new files. So I suppose I have to update my uninstaller in order to allow user to uninstall these news files too.
So I have redefined a section Uninstall in my updater. But the problem is that the Uninstall.exe is not overwrite.
My general step in my updater are the following
;pages
;welcome page
!define MUI_WELCOMEPAGE_TITLE "Updater: $CURRENT_VERSION to ${LAST_VERSION}"
!define MUI_WELCOMEPAGE_TEXT "$(MUI_WELCOMEPAGE_TEXT)" ;Langstring MUI_WELCOMEPAGE_TEXT
!insertmacro MUI_PAGE_WELCOME
;inst page
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_NOAUTOCLOSE
;page FINISH
!define MUI_FINISHPAGE_RUN "$INSTDIR\MyProg.exe"
!define MUI_FINISHPAGE_RUN_TEXT "$(MUI_FINISHPAGE_RUN_TEXT)"
!insertmacro MUI_PAGE_FINISH
;uninstaller
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;sections
Section "Files"
SetOutPath "$INSTDIR"
File "..\..\MyNewFiles"
...
SectionEnd
Section "Uninstall"
;Same Uninstall section as in my installer but with some more RMDIR
RMDir /r "$INSTDIR\FolderCreatedDuringUpdate"
...
SectionEnd
The new files are well deployed, but the uninstaller is not overwrited.
The updater (file updater.exe) is downloaded in the same folder as the application. Do I have to initialize the constant "$INSTDIR" ?
Thanks in advance for your help