Hi,
  Q1, Set the Feature's attribute "Level" to 0, then it will be disabled.
  Q2, Feature have some action states and install states, and you can use this 
to force users to choose only one of them.
      
  
Prepending some special characters to the names will give them extra meaning:
    %  environment variable (name is case insensitive)
    $   action state of component
    ?   installed state of component
    &   action state of feature
    !   installed state of feature
    The last four can return the following integer values:
   -1   no action to be taken
   1   advertised (only for components)
   2   not present
   3   on the local computer
   4   run from the source
A few examples to make things clearer:
(&FeatureName = 3) AND NOT (!FeatureName = 3)
Run action only if the product will be installed locally. Do not run action on 
a reinstallation.
The term &FeatureName = 3 means the action is to install the feature locally.
The term NOT (!FeatureName = 3) means the feature is not installed locally.

 (&FeatureName = 2) AND (!FeatureName = 3)
Run action only if the feature will be uninstalled.
This condition only checks for a transition of the feature from an installed 
state of local to the absent state.

(?ComponentName = 3) AND ($ComponentName = 2 OR $ComponentName = 4)
Run action only if the component was installed locally, but is transitioning 
out of state.
The term ?ComponentName = 3 means the component is installed locally.
The term $ComponentName = 2 means that the action state on the component is 
absent.
The term $ComponentName = 4 means that the action state on the component is run 
from source. Note that an action state of advertise is not valid for a 
component.

?ComponentName = $ComponentName
Run action only on the reinstallation of a component.

  You can use <Condition action></Condition> to finish your job. And if it 
doesn't work, you may have to write a customized diaog with a radio button 
group or a listbox to help users selecting only one of the featrues.
   See more on Wix tutorial.

2009-11-18 
salever.lee 



发件人: Henry Sheldon 
发送时间: 2009-11-18  00:51:58 
收件人: 'General discussion for Windows Installer XML toolset.' 
抄送: 
主题: [WiX-users] Feature Tree - Disable all Features 
 
Hi,
I'm relatively new to WiX and am using WixUI_FeatureTree for the first time.
I have two small installations that I'm trying to combine into one script.
One for the Client and one for the Server.  I'm trying to make both Features
in the FeatureTree to default to "Entire Feature will be Disabled" so the
user has to turn one of them on to continue with the install. Currently the
first Feature is active and the second feature is the way I want it.  
My first question is:  How do I make both features default to "Entire
Feature will be Disabled" status?   
Second question which is not as important as the first, however if I can do
it I would like to:  Is it possible to make one Feature not be able to be
selected if the second feature is anything other than Disabled?  I would
like to make the user only be able to turn on one Feature at a time rather
then turn them both on.  I want them to run it twice if they want the Server
and the Client on the same machine.  This is to just make sure there are no
mistakes in their installation choices.
Here's the Code I have so far:  
    <Feature Id='ClientInstall' Title='Client' Description='Client'
AllowAdvertise='no'
      Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
        <ComponentRef Id='ClientInstaller' />
    </Feature>
    <Feature Id='DownloadServiceInstall' Title='Download Service'
Description='Download Service' AllowAdvertise='no'
      Display='expand' Level='2' ConfigurableDirectory='INSTALLDIR'>
        <ComponentRef Id='DownloadServiceInstaller' />
    </Feature>
Thanks for any and all help!!
Best Regards,
Henry Sheldon
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to