Search code examples
visual-studio-2010setup-project

visual studio 2010 setup project - uninstall custom action


During install, I'm passing some CustomActionData to CustomAction.

Is that data stored somehow? I need to use some of the data during uninstall in uninstall custom action.

I can't resend this data because user might not be using the msi file to uninstall but go to add / remove programs.

I need somehow in uninstall custom action to retrieve data that was already sent during install.


Solution

  • Here is the usual approach:

    • save the information you need in an installer property
    • use that property as a registry entry value
    • create a search (in Launch Conditions Editor) which reads this registry entry
    • the search property can be used during uninstall

    Basically, you save the information during install and read it through a search during uninstall.