views:

307

answers:

0

I'm struggling to find documentation on how the stateSaver/savedState Dictionary works for the Windows Installer, in the Install and UnInstall overrides, can someone help.

In my installers CustomAction I've been writing to registry entries, each time I do I add some of it's detail to the stateSaver. I had presumed this was taken into account when uninstalling but how?

I think the stateSaver Dictionary is written to file when you install, and on uninstall the content of that file, .InstallState is read and used to install the entries it finds.

My issue is some registry entries remain after uninstall, I don't know why and my lack of understanding of how the Dictionary works is not helping.

Here's an example of what the Install is doing

RegistryKey expressionEvaluatorVersionKey = expressionEvaluatorKey.CreateSubKey(packageVersion);

This is creating a Sub Key for a key added with the Windows Installer. How should I delete this Sub Key in the uninstall?