I have read all topics on this site with problem like this, but not find what i need.
I have two versions of one program: old and new. In old version i have folder f1. In new version i have no this folder f1.
When installer of new programm detected old version, it delete this old version, but not folder f1.
How can i delete f1 from installer of new version?
<Component Id ="deleteall" Guid="AA11A32B-9E1E-458A-8C94-3EFEDA77E494" >
<RemoveFolder Id='iDocDir' On='both' />
</Component>
<Directory Id="iDocDir" Name="iDocs">
</Directory>
not working =(
You should check out the
RemoveFolderEx
element in the UtilExtension. It does exactly what you want. Bob Arnson has blogged about it before.It works by writing temporary rowes to the
RemoveFile
table. There are restrictions to using this, however, as noted in the manual:And also in Bob's post:
If you already save your previous installation path (Rob explains how to do this here) in the registry, you're fine, as the AppSearch action runs before CostInitialize.