How can I find if I'm currently in uninstallation mode?


1 comment

  • Avatar

    For detecting if an action is in installer or uninstaller, you can simply set a variable in <initializationActionList> and then just do a check. For example:


    Then you can simply check it by doing:


    For checking if an action is run in uninstaller, the rule should just be <ifFalse>.

    Regarding if the uninstaller is going to uninstall entire application, the <preUninstallationActionList> and <postUninstallationActionList> for <project> is only run when uninstalling application, so actions that should clean up the application should be run from <project> ones.

    Also, <preUninstallationActionList> for <project> is run before ones for components (and are the first actions run in uninstaller), you can simply set a variable and check it in other actions:


Please sign in to leave a comment.