I created an application that creates some folders in the APPDATA dir, I want those folders to be deleted when my application is uninstalled. But I don't seem to be able to do it. After several tries and searches I ended up using the SearchDirectory
property.
What I am doing wrong?
<Feature Id="ProductFeature" Title="Test" Level="1">
...
<ComponentRef Id="DeleteAppData" />
</Feature>
<Property Id="APPLICATIONDATAFOLDER">
<DirectorySearch Id="Search" Path="[AppDataFolder]Test" AssignToProperty="yes" />
</Property>
<Fragment>
...
<!-- Delete APPDATA folder -->
<Component Id="DeleteAppData" Directory="AppDataFolder" Guid="###">
<util:RemoveFolderEx Id="RemoveAppData" On="uninstall" Property="APPLICATIONDATAFOLDER" />
</Component>
</Fragment>