[wix-users] Setting Checkbox value from command line

Edwin Castro egcastr at gmail.com
Wed Jun 27 08:45:22 PDT 2018


To select features to install from the command line (for silent installs)
set ADDLOCAL. For example,

msiexec /i package.msi /qn ADDLOCAL=DBFeature

You can select multiple feautres by separating them with a comma.

msiexec /i package.msi /qn ADDLOCAL=AppFeature,DBFeature

--
Edwin G. Castro


On Wed, Jun 27, 2018 at 8:40 AM, Edwin Castro <egcastr at gmail.com> wrote:

> The InstallUISequence (and thus dialogs like the one you shared)  do not
> run when installing an MSI silently. Are you expecting the dialog to
> perform any kind of work that will ensure AppFeature does not get
> installed? If that is the case, then the problem might be that work is not
> happening because the InstallUISequence is not running when installing
> silently.
>
> --
> Edwin G. Castro
>
>
> On Wed, Jun 27, 2018 at 8:19 AM, Ven H via wix-users <
> wix-users at lists.wixtoolset.org> wrote:
>
>> I have a Dialog like below.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
>>   <Fragment>
>>
>>     <UI>
>>       <Dialog Id="SelectFeatureDlg" Title="!(loc.SelectFeatureDlgTitle)"
>> Width="370" Height="270" NoMinimize="yes">
>>      <Control Id="Title" Type="Text" X="15" Y="6" Width="250" Height="15"
>> Transparent="yes" NoPrefix="yes"  Text="!(loc.FeatureTitle)"/>
>> <Control Id="Description" Type="Text" X="25" Y="23" Width="280"
>> Height="15"
>> Transparent="yes" NoPrefix="yes" Text="!(loc.FeatureDescription)" />
>>
>>         <Control Id="chkBoxAll" Type="CheckBox" X="50" Y="65" Width="110"
>> Height="17" Property="INSTALL_ALL" CheckBoxValue="1"
>> Text="!(loc.AllFeatureText)">
>>         <Publish Property="INSTALL_APP" Value="1"
>> Order="1">INSTALL_ALL</Publish>
>>           <Publish Property="INSTALL_APP" Value="{}" Order="2">NOT
>> INSTALL_ALL</Publish>
>>           <Publish Property="INSTALL_DB" Value="1"
>> Order="3">INSTALL_ALL</Publish>
>>           <Publish Property="INSTALL_DB" Value="{}" Order="4">NOT
>> INSTALL_ALL</Publish>
>>           <Condition Action="disable">(!AppFeature = 3) OR (!DBFeature =
>> 3)</Condition>
>>         </Control>
>>         <Control Id="chkBoxApp" Type="CheckBox" X="71" Y="85" Width="110"
>> Height="17" Property="INSTALL_APP" CheckBoxValue="1"
>> Text="!(loc.AppFeatureText)">   <Publish Property="INSTALL_ALL" Value="{}"
>> Order="1">NOT INSTALL_APP AND NOT INSTALL_DB</Publish>
>>           <Publish Property="INSTALL_ALL" Value="1"
>> Order="2">INSTALL_APP</Publish>
>>           <Condition Action="disable">!AppFeature = 3</Condition>
>>           <Condition Action="enable">!AppFeature = 2</Condition>
>>         </Control>
>>         <Control Id="chkBoxDB" Type="CheckBox" X="71" Y="105" Width="110"
>> Height="17" Property="INSTALL_DB" CheckBoxValue="1"
>> Text="!(loc.DBFeatureText)">    <Publish Property="INSTALL_ALL" Value="{}"
>> Order="1">NOT INSTALL_APP AND NOT INSTALL_DB</Publish>
>>           <Publish Property="INSTALL_ALL" Value="1"
>> Order="2">INSTALL_DB</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="ConnDetailsDlg">NOT
>> INSTALLED</Publish>
>>           <Publish Event="NewDialog"
>> Value="InstallDlg">WIX_UPGRADE_DETECTED</Publish>
>>              <Condition Action="disable">NOT INSTALL_APP OR NOT INSTALL_DB
>> OR (((!AppFeature = 3) AND (!DBFeature = 2) AND NOT INSTALL_DB) AND
>> ((!DBFeature = 3) AND (!AppFeature = 2) AND NOT INSTALL_APP)) OR
>> ((!AppFeature = 3) AND (!DBFeature = 3))</Condition>
>>           <Condition Action="enable">(INSTALL_APP OR INSTALL_DB) AND
>> (((!AppFeature = 2) AND INSTALL_APP) OR ((!DBFeature = 2) AND
>> INSTALL_DB))</Condition>
>>            <Publish Event="AddLocal" Value="ALL">1</Publish>
>>           <Publish Event="Remove" Value="AppFeature"><![CDATA[INSTALL_APP
>> <> "1"]]></Publish>
>>           <Publish Event="Remove" Value="DBFeature"><![CDATA[INSTALL_DB
>> <>
>> "1"]]></Publish>
>>         </Control>
>>       </Dialog>
>> </UI>
>>   </Fragment>
>> </Wix>
>>
>> AppFeature & DBFeature are the feature IDs. I need to have the ability for
>> Silent Install. But even when I pass INSTALL_APP="" and INSTALL_DB="1", it
>> is always installing the app feature also. I tried  INSTALL_APP="{}" also,
>> but still it installs the app feature. I also tried not passing this
>> property at all from the command line, but still no luck. Can anyone
>> please
>> help me achieve this?
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>
>



More information about the wix-users mailing list