Archive: Uninstaller in a subdirectory


Uninstaller in a subdirectory
I am moving a group of uninstallers to their respective subdirectories of the common install directory. (This is because a number of exe's will share files.) Under certain conditions, I want an installer to be able to remove what's left of the install directory (all other exe's having been uninstalled). However, I find that RMDir and Delete are no longer succeeding in the install path for anything except the installer's directory. What do I need to do?


$INSTDIR is the directory where the uninstaller is located. You can use GetParent to get the parent directory of $INSTDIR.


Are you saying that it is a mistake to place the uninstaller in a subdirectory of $INSTDIR? Currently I have it in $INSTDIR\test. In this position, I am only able to delete \test and its contents.


Uninstaller recognizes as $INSTDIR the directory from where is executed.
You should either use GetParent as kichik suggested or read the $INSTDIR from registry, see NSIS manual about,

http://nsis.sourceforge.net/Docs/Chapter3.html#3.2.2


I am beginning to understand. Thank you both very much.

Here's what I'm doing now, along with the error I'm getting. Please advise:

!include FileFunc.nsh
!insertmacro un.GetParent
. . .
${GetParent} "$INSTDIR\uninst.exe" $R0

Compile error -->> Invalid command: ${GetParent}


!insertmacro un.GetParent --> ${un.GetParent}


Again I say: THANKS SO VERY MUCH! !