C:\Program Files\CompanyName\ProductName
During the uninstall,
RMDir /R "$INSTDIR" will only remove the ProductName folder, leaving an empty CompanyName folder. Is there a smart way to remove the folder CompanyName? As far as I can tell there is no way to capture which directories are being created by the installer. Hardcoding
RMDir /R "$INSTDIR"
RMDir /R "C:\\Program Files\\CompanyName" isn't a viable solution, because the problem still exists for non-default installations that have subfolders (and this problem also exists for removing shortcuts).Also, doing something like
StrCpy $R0 $INSTDIR
loop:
RMDir "$R0"
IfErrors goto done
StrCpy "$R0" "$R0\\.."
goto loop
done: isn't a (completely) viable solution because you might end up deleting an empty directory the installer didn't create, that the user doesn't want deleted.Suggestions?