How can I find if I'm currently in uninstallation mode? Also if I turned on "allow adding or removing components", how can I find if I'm removing the entire application or removing individual components?

Looks like the "pre-uninstallation actions" don't get execuated if I chose removing individual components.

asked 06 Jun '12, 21:06

gt8967884's gravatar image

accept rate: 12%

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:


answered 07 Jun '12, 02:15

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 06 Jun '12, 21:06

Seen: 831 times

Last updated: 07 Jun '12, 02:15