Hi, Very simple one, but it's buggin me

I have one feature that want to be executed anytime except uninstall, another one during uninstall only
I am having problems with the syntax. This populates the table WiseFeatureCondition in Wise

Feature during install: conditon: NOT REMOVE
Feature during uninstall: condition: Remove~=ALL

Am i missing something?

0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Hi Bob,
See: http://msdn.microsoft.com/en-us/library/aa368012(VS.85).aspx
The condition should go to the condition table.
Basically, you control the feature with the Installlevel.
Regards, Nick
Answered 03/05/2009 by: nheim
Tenth Degree Black Belt

Please log in to comment
Hi and thanks for the reply.

I was figuring that out in the last hour and understand now how this interacts with the install level. But i am still unable to achieve what am doing.

There is a component that update an existing registry key. This component is alone in a feature (feature1, installleve 4). I wanted that feature to not be executed during the uninstall because it will delete the key.

Now i have another component in another feature (feature2, installlevel4) that i want to execute only if uninstalled. This one will revert the reg key to its original value.

my condition table is instructing to set the installlevel to 3 if :
feature1=NOT REMOVE

I was only doing test with feature1, without feautre2. I am successful at installing it, condition is met, installlevel for that one sets back to 3 and it get installed. But, I am unable to leave it alone during an uninstall. My guess is:

During install, condition is met -> Set installlevel to 3 -> Install
During uninstall, condition is not even checked, installevel is 3 because it was set to 3 during install and it gets uninstalled.

Is this how it works and does that make sense? Can a feature be installed and just IGNORED during an uninstall?

Answered 03/05/2009 by: unreal2me
Orange Senior Belt

Please log in to comment
Can a feature be installed and just IGNORED during an uninstall?
Why would you want to do that?

If you want component(s) resources to be left during uninstall then add the Attribute bit msidbComponentAttributesPermanent (16) in the Attributes column for that component or components.
Answered 03/05/2009 by: AngelD
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity