How can I remove .NET isolated storage setting folders during WiX uninstallation?

Posted by Luke on Stack Overflow See other posts from Stack Overflow or by Luke
Published on 2010-05-21T04:33:49Z Indexed on 2010/05/21 4:40 UTC
Read the original article Hit count: 321

I would like to remove the isolated storage folders that are created by a .NET application when using My.Settings etc. The setting files are stored in a location like

C:\Users\%Username%\AppData\Roaming\App\App.exe_Url_r0q1rvlnrqsgjkcosowa0vckbjarici4

As per this question StackOverflow: Removing files when uninstalling Wix I can uninstall a folder using:

<Directory Id="AppDataFolder" Name="AppDataFolder"> 
    <Directory Id="MyAppFolder" Name="My"> 
        <Component Id="MyAppFolder" Guid="YOURGUID-7A34-4085-A8B0-8B7051905B24"> 
            <CreateFolder />
            <RemoveFile Id="PurgeAppFolder" Name="*.*" On="uninstall" /> 
        </Component> 
    </Directory> 
</Directory>

<!-- LocalAppDataFolder-->

This doesn't support sub-folders etc. Is the only option a custom .NET action or is there a more simple approach for removing these .NET generated setting folders?

© Stack Overflow or respective owner

Related posts about wix3

Related posts about custom-action