/build/static/layout/Breadcrumb_cap_w.png

Correct syntax for feature condition

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?

Thanks

0 Comments   [ + ] Show comments

Answers (3)

Posted by: nheim 15 years ago
10th Degree Black Belt
0
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
Posted by: unreal2me 15 years ago
Orange Senior Belt
0
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
feature2=REMOVE="ALL"

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?

Thanks
Posted by: AngelD 15 years ago
Red Belt
0
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ