[wix-users] Checkbox property in Silent Install

Marwan Tabet chicagomarwan at gmail.com
Wed May 2 07:00:42 PDT 2018


Checkboxes get checked when a value is set and unchecked when property
associated with that checkbox is undefined.

On Wed, Apr 25, 2018, 6:23 AM Ven H via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Markup of select feature dialog is given below. This works fine with UI.
> Initially both the check boxes (for App and DB feature) and the All check
> box will be checked. According to the checkbox selection, the corresponding
> feature gets installed from the UI. But this is not working from silent
> install. AppFeature and DBFeature are my feature IDs.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
>   <Fragment>
>       <Property Id="ALLFEATURES_CHECKED" Value="1" Secure="yes"></Property>
>       <Property Id="APPFEATURE_CHECKED" Value="1" Secure="yes"></Property>
>       <Property Id="DBFEATURE_CHECKED" Value="1" Secure="yes"></Property>
>     <SetProperty Id="ALLFEATURES_CHECKED" Value="1"
> After="CostFinalize">(!AppFeature = 3) AND (!DBFeature = 3)</SetProperty>
>     <SetProperty Id="APPFEATURE_CHECKED" Value="1"
> After="CostFinalize">!AppFeature = 3</SetProperty>
>     <SetProperty Id="DBFEATURE_CHECKED" Value="1"
> After="CostFinalize">!DBFeature = 3</SetProperty>
>     <UI>
>       <Dialog Id="SelectFeatureDlg" Title="!(loc.SelectFeatureDlgTitle)"
> Width="370" Height="270" NoMinimize="yes">
>         <Control Id="chkBoxAll" Type="CheckBox" X="50" Y="33" Width="140"
> Height="17"
>     Property="ALLFEATURES_CHECKED" CheckBoxValue="1"
> Text="{\BoldFont}!(loc.AllFeatureText)">
>         <Publish Property="APPFEATURE_CHECKED" Value="1"
> Order="1">ALLFEATURES_CHECKED</Publish>
>           <Publish Property="APPFEATURE_CHECKED" Value="{}" Order="2">NOT
> ALLFEATURES_CHECKED</Publish>
>           <Publish Property="DBFEATURE_CHECKED" Value="1"
> Order="3">ALLFEATURES_CHECKED</Publish>
>           <Publish Property="DBFEATURE_CHECKED" Value="{}" Order="4">NOT
> ALLFEATURES_CHECKED</Publish>
>           <Condition Action="disable">(!AppFeature = 3) OR (!DBFeature =
> 3)</Condition>
>         </Control>
>         <Control Id="chkBoxApp" Type="CheckBox" X="61" Y="52" Width="140"
> Height="17"
>      Property="APPFEATURE_CHECKED" CheckBoxValue="1"
> Text="{\BoldFont}!(loc.AppFeatureText)">
>           <Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT
> APPFEATURE_CHECKED AND NOT DBFEATURE_CHECKED</Publish>
>           <Publish Property="ALLFEATURES_CHECKED" Value="1"
> Order="2">APPFEATURE_CHECKED</Publish>
>           <Condition Action="disable">!AppFeature = 3</Condition>
>           <Condition Action="enable">!AppFeature = 2</Condition>
>         </Control>
>         <Control Id="chkBoxDB" Type="CheckBox" X="61" Y="69" Width="140"
> Height="17"
>            Property="DBFEATURE_CHECKED" CheckBoxValue="1"
> Text="{\BoldFont}!(loc.DBFeatureText)">
>           <Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT
> APPFEATURE_CHECKED AND NOT DBFEATURE_CHECKED</Publish>
>           <Publish Property="ALLFEATURES_CHECKED" Value="1"
> Order="2">DBFEATURE_CHECKED</Publish>
>          <Condition Action="disable">!DBFeature = 3</Condition>
>         <Condition Action="enable">!DBFeature = 2</Condition>
>         </Control>
>
>         <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
> Height="17" Text="!(loc.WixUIBack)">
>           <Publish Event="NewDialog" Value="CustLicenseAgmtDlg"
> Order="1">NOT Installed</Publish>
>           <Publish Event="NewDialog" Value="CustMaintenanceTypeDlg"
> Order="2">Installed</Publish>
>         </Control>
>         <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
> Height="17" Default="yes" Text="!(loc.WixUINext)">
>           <Publish Event="SpawnWaitDialog"
> Value="WaitForCostingDlg">CostingComplete = 1</Publish>
>    <Publish Event="NewDialog" Value="BrowsePathDlg">NOT INSTALLED</Publish>
>           <Publish Event="NewDialog"
> Value="InstallDlg">WIX_UPGRADE_DETECTED</Publish>
>              <Condition Action="disable">NOT APPFEATURE_CHECKED OR NOT
> DBFEATURE_CHECKED OR (((!AppFeature = 3) AND (!DBFeature = 2) AND NOT
> DBFEATURE_CHECKED) AND ((!DBFeature = 3) AND (!AppFeature = 2) AND NOT
> APPFEATURE_CHECKED)) OR ((!AppFeature = 3) AND (!DBFeature =
> 3))</Condition>
>           <Condition Action="enable">(APPFEATURE_CHECKED OR
> DBFEATURE_CHECKED) AND (((!AppFeature = 2) AND APPFEATURE_CHECKED) OR
> ((!DBFeature = 2) AND DBFEATURE_CHECKED))</Condition>
>            <Publish Event="AddLocal" Value="ALL">1</Publish>
>           <Publish Event="Remove"
> Value="AppFeature"><![CDATA[APPFEATURE_CHECKED <> "1"]]></Publish>
>           <Publish Event="Remove"
> Value="DBFeature"><![CDATA[DBFEATURE_CHECKED <> "1"]]></Publish>
>         </Control>
>         <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
> Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
>           <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
>         </Control>
>       </Dialog>
>     </UI>
>   </Fragment>
> </Wix>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list