I am trying to get around RMDir /r $INSTDIR by installing my files in a sub directory that is unique and that can be safely removed.
My install script looks like this:
Which installs the files into "$PROGRAMFILES\company name\product name", but my install dir should still be "$PROGRAMFILES\company name" correct?InstallDir "$PROGRAMFILES\company name"
SetOutPath "$INSTDIR"
File /r "product name"
My uninstaller is as follows:
Which I was hoping would just recursively remove the "product name" folder and not the "company name", and then if the "company name" folder is empty remove that too.RMDir /r "$INSTDIR\product name"
RMDir "$INSTDIR"
But instead it thinks that "$PROGRAMFILES\company name\product name" is the INSTDIR.
Does anyone know what I'm doing wrong? I've been looking a while for a solution for this.