....and the problem was...

I was only testing the checkbox after installing then doing a "change" install. 
so the "Not Installed" was stopping it from working.

Thanks for your help everyone, I knew it had to be simple

Simon

-----Original Message-----
From: Simon Topley [mailto:simon.top...@mwhsoft.com] 
Sent: 26 January 2011 12:00
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Feature condition evaluation

I've gone down the repeated component ref's route and I'm happy with how it 
works, it ref counts it correctly so it only removes the component once the 
last feature that uses it has gone. The XML looks a bit messy but it works 
exactly how I want it too.

All I need to get to work now is this checkbox, which seems to ignore the 
components install or action state. More new as it comes.

Simon

-----Original Message-----
From: maksim.vazhe...@emc.com [mailto:maksim.vazhe...@emc.com] 
Sent: 26 January 2011 11:49
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Feature condition evaluation

Maybe you should hide the feature "C" from user, and in the 
InstallExecuteSequence run a custom action to change the state of the feature 
"C" (it can be made with MsiSetFeatureState function) according to the install 
states of other features (you can get feature state with MsiGetFeatureState 
function). 

Or you can make a 'Root' feature, your 5 features will be its children, and 'C' 
feature also will be a child of 'Root' with attribute 
'msidbFeatureAttributesFollowParent' (the state of 'C' will be the same as 
'Root', and 'Root' will be installed if any of 5 features will be installed).
But in this case you will need to show 'Root' feature to user.

Maksim

-----Original Message-----
From: Simon Topley [mailto:simon.top...@mwhsoft.com] 
Sent: Wednesday, January 26, 2011 2:15 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Feature condition evaluation

I think I'll have to ditch the feature altogether and just repeat the 
components refs in all of the features that require it :(

then I can just check the install state of the component to show or hide my 
checkbox on the exit dialog like this:

<Control Id="LaunchCheckBox" Type="CheckBox" X="10" Y="243" Width="170" 
Height="17" Property="LAUNCHAPPONEXIT" Hidden="yes" CheckBoxValue="1" 
Text="Launch Configuration Tool.">
                    <Condition Action="show">NOT Installed AND 
?cConfigT&gt;2</Condition>
                </Control>

although I'm sure it won't work.. I'll try it.

-----Original Message-----
From: Simon Topley [mailto:simon.top...@mwhsoft.com] 
Sent: 26 January 2011 10:14
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Feature condition evaluation

Thanks Blair,

you are correct, I attempted to use feature ref's and ran into a number of 
issues, but I think it's time I revisited it. The biggest issue I ran into is 
that feature "C" needs to be installed if 1 of 5 other features is installed, I 
guess I've over simplified my explanation of the problem. So it needs to be a 
child feature of all of them, which threw a lot of issues at me. I think I'll 
have another crack at it though as it is the only alternative other than to 
just put the work onto the user so they decide when the feature should or 
shouldn't be included.

Then I'll move onto trying to figure out why my checkbox on the exit dialog 
never reacts correctly to this property I managed to set.

Simon

-----Original Message-----
From: Blair [mailto:os...@live.com]
Sent: 25 January 2011 08:21
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Feature condition evaluation

Feature selection works like/is sequenced like this:

In CostFinalize, if none of the following properties are set, then the
Feature table is used to determine which features will be installed (in
conjunction with the both the INSTALLLEVEL property and the Condition
table). If any of the following properties are set, the Condition table is
ignored (meaning Feature Conditions are ignored) and only the following
properties (along with the Level column, unmodified by the Condition table)
are used (once again, by CostFinalize):

Preselected
ADDLOCAL
REMOVE
ADDSOURCE
ADDDEFAULT
REINSTALL
ADVERTISE
COMPADDLOCAL
COMPADDSOURCE
COMPADDDEFAULT
FILEADDLOCAL
FILEADDSOURCE
FILEADDDEFAULT

After CostFinalize, you can use APIs that change Feature action states (or,
in the UI sequence, events that do the same), but those APIs have to then be
called via Custom Actions (or UI events)

If UI is run, then some of the above properties will be set by the UI
sequence for the Execute sequence, thus invoking the above mentioned
limitations in that latter sequence.

If you are using both UI and Execute sequences, you can set a property
post-CostFinalize in the UI sequence that you use pre-CostInitialize in the
Execute sequence to append your feature onto the ADDLOCAL property. However,
since there are no guarantees that the UI sequence will ever be run, that
probably will never be a satisfactory guarantee.

Honestly, a parent-child relationship between the features is the only
reliable way to do what you need.

I also honestly don't understand your comment: "I want C to be installed
only with B but it can't be a child feature as it is in another file and
used by other installers." What does it matter if it is a child feature in
this one product?

Features are a per-product concept, and Feature C in Product X and Feature C
in Product Y are as equivalent as the town of Moscow in the state of Idaho
of the United States is the same as the city of Moscow in the nation of
Russia. In your case they may happen to have all the same components, but
from the point of view of Windows Installer, that is a mere coincidence, and
there is no more meaning than that (unless you explicitly set
MigrateFeatureStates because the products share UpgradeCodes, but you turn
that on row-by-row in the Upgrade table).

In other words, you can do this:

<Feature Id="B"><FeatureRef Id="C"/></Feature>

and that will not effect in the least the usage of Feature C in your other
unrelated product (except for the fact that you will likely be sharing
Feature C's components, which from your explanations I understand to be your
intent).

-Blair

-----Original Message-----
From: Simon Topley [mailto:simon.top...@mwhsoft.com]
Sent: Monday, January 24, 2011 4:47 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Feature condition evaluation

Afternoon all,

SO I'm back trying to tackle this issue with my SetProperty after
Costfinalize. The property is set correctly, but nothing now seems to
respond to it.


MSI (s) (3C:98) [04:37:53:630]: Doing action: SetCONFIGREQUIRED
Action 04:37:53: SetCONFIGREQUIRED.
Action start 04:37:53: SetCONFIGREQUIRED.
MSI (s) (3C:98) [04:37:53:630]: PROPERTY CHANGE: Adding CONFIGREQUIRED
property. Its value is '1'.
Action ended 04:37:53: SetCONFIGREQUIRED. Return value 1.
MSI (s) (3C:98) [04:37:53:645]: Doing action: InstallValidate
Action 04:37:53: InstallValidate. Validating install
Action start 04:37:53: InstallValidate.
MSI (s) (3C:98) [04:37:53:645]: Feature: feConfig; Installed: Local;
Request: Null;   Action: Null

the feConfig is dependent on the property CONFIGREQUIRED:

<Feature Id='feConfig' Title='Config tool x86' Display="hidden" Level='1'>
    <ComponentRef Id='cConfigT' />
    <ComponentRef Id='cProgramMenuDirINMCleanup' />
    <Condition Level="0"><![CDATA[NOT CONFIGREQUIRED]]]></Condition>
  </Feature>

but as you can see the log shows that the requested action for the feature
is null. Is it too late to change the condition of the feature after
CostFinalize? If so, is there any way to make a feature dependent on anther
other than to have it as a child of the feature it is dependent on?

Disclaimer: This electronic communication and its attachments may contain
confidential, proprietary and/or legally privileged information which are
for the sole use of the intended recipient. If you are not the intended
recipient, any use, distribution, or reproduction of this communication is
strictly prohibited and may be unlawful; please contact the sender and
delete this communication. MWH Soft does not warrant or make any
representation regarding this transmission whatsoever nor does it warrant
that it is free from viruses or defects, correct or reliable. MWH Soft is
not liable for any loss or damage that occurs as a result of this
communication entering your computer network.

The views expressed in this message are not necessarily those of MWH Soft.
This communication cannot form a binding agreement unless that is the
express intent of the parties and they are authorized to make such an
agreement. MWH Soft reserves all intellectual property rights contained in
this transmission. MWH Soft reserves the right to monitor any electronic
communication sent or received by its employees.

MWH Soft Limited is registered in England with number 6975921. Its
registered office is Terriers House, 201 Amersham Rd, High Wycombe, HP13
5AJ.


----------------------------------------------------------------------------
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Disclaimer: This electronic communication and its attachments may contain 
confidential, proprietary and/or legally privileged information which are for 
the sole use of the intended recipient. If you are not the intended recipient, 
any use, distribution, or reproduction of this communication is strictly 
prohibited and may be unlawful; please contact the sender and delete this 
communication. MWH Soft does not warrant or make any representation regarding 
this transmission whatsoever nor does it warrant that it is free from viruses 
or defects, correct or reliable. MWH Soft is not liable for any loss or damage 
that occurs as a result of this communication entering your computer network.

The views expressed in this message are not necessarily those of MWH Soft. This 
communication cannot form a binding agreement unless that is the express intent 
of the parties and they are authorized to make such an agreement. MWH Soft 
reserves all intellectual property rights contained in this transmission. MWH 
Soft reserves the right to monitor any electronic communication sent or 
received by its employees.

MWH Soft Limited is registered in England with number 6975921. Its registered 
office is Terriers House, 201 Amersham Rd, High Wycombe, HP13 5AJ.


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to