windows-installerinstallationinstallshield-2010

Installshield 2010 Clean Uninstall


During Install I create a Folder (Covers) in {INSTALLDIR} that ends up with a few images. On uninstall I would like to Delete this folder and [ALLCONTENT].

After 2 days I managed to Delete (DeleteDir) a folder if I have the exact path("C:\Whatever")

Since I have no idea where the app will be installed - how can I refer to this path in the script? In Components its labled [INSTALLDIR]Covers. Tried every possible "string value" for that with no luck.

There is no example for this (for 2010) anywhere. This is an UNinstaller right? How could this be so difficult?

Update1: I created an Environment Variable pointing to the folder and use ExFn_GetEnvVar to get the full path value. Only works if the Folder is empty.


Solution

  • Solved by using RemoveFile Table. The trick is to remove all files from the directory (*) before you attempt to Delete the directory.The directory can be deleted by leaving the FileName entry blank.