Archive: Uninstaller in different folder


Uninstaller in different folder
Hi,

I need to put the uninst.exe file in a subdirectory of the INSTDIR. But when running the uninstaller, it fails to delete the files from INSTDIR.

Is INSTDIR set to the folder where uninst.exe is stored for the uninstaller? Why does this happen?


Hi :)

Yes, INSTDIR is set to the folder where the uninstaller is stored when running the uninstaller. What you can do is to redefine it in the 'pre' function of the uninstaller's confirm page:

; If you need to save the uninstaller's location
Var UNINSTDIR

!define MUI_PAGE_CUSTOMFUNCTION_PRE un.onPreConfirmPage
!insertmacro MUI_UNPAGE_CONFIRM



Function un.onPreConfirmPage
StrCpy $UNINSTDIR $INSTDIR

; Put some code here to retrieve the real INSTDIR
; (from the registry or from an 'ini' file for instance)

FunctionEnd


Let me know if it doesn't work..

evilO/Olive