I have a .NET 4.0 application that uses Isolated Storage to store user files for my application. This ends up using a folder structure like the following:
%LocalAppData%\IsolatedStorage\af34odgf.fj1\bheukjsx.mvr\Url.vc242bhqlc4nzx5043sp5wof15zyzvq0\AssemFiles.
This is fine, I think. However, since these directories and files are created after my application is installed, Windows Installer will not remove them. There are many references online that indicate that one should use a custom action to remove files and directories that are created after installation. I am stuck on how to actually implement this for IsolatedStorage. Specifically, how do I obtain the path to the Isolated Storage folder of my application from the context of the custom action?
If I execute something like IsolatedStorageFile.GetUserStoreForApplication();
from my custom action, won't "application" refer to my installer rather than my application? If so, that would give me a completely different and new Isolated Storage folder path. Or do I have a misconception about where the custom action DLLs "live"?
I am currently using WiX, but I suspect the answer is likely independent of that.