I've got two features. The main feature and a second optional feature (managed with a property set by a UI dialog).
If I execute the installation and disable the installation of optional feature, the product will install without the optional feature. (It's OK)
If I'll execute the .msi again and choose to install the optional feature - it will not install.
The only way to do this is that I uninstall the product and reinstall it again with this optional feature selected.
I've also tried with the two option REINSTALL=ALL
and INSTALLMODE=AMUS
but nothing was change.
This is my WiX code:
<Feature Id="ProductFeature" Title="MAIN" Level="1">
<ComponentGroupRef Id="MAIN_GROUP" />
</Feature>
<Feature Id="OptionalFeature" Title="OPTIONAL" Level="1">
<Condition Level="3000"><![CDATA[CHECKBOX_UI <> "1"]]></Condition>
<ComponentGroupRef Id="OPTIONAL_GROUP" />
</Feature>
Is there a way to add features on the second installation time, with the same version of installer?
I would like to modify the installed product during the second run of the Installer.
This is the code of the initial custom dialog where I used CTM_NEWF_Cbx checkbox as a conditional property to manage the Component conditional installation.
<Dialog Id="C_TypeInstallationDlg" Width="370" Height="270" Title="Bla bla bla">
<Control Type="Bitmap" Id="CTM_Bmp" Width="140" Height="235" X="0" Y="0" Text="WizardBackgroundBmp" />
<Control Type="Line" Id="CTM_Line" Width="370" Height="1" X="0" Y="235" />
<Control Type="PushButton" Id="CTM_ExitBtn" Width="56" Height="17" X="306" Y="246" Text="Cancel">
<Publish Event="EndDialog" Value="Exit" />
</Control>
<Control Type="Text" Id="CTM_WelcomeLbl" Width="200" Height="17" X="150" Y="15" Text="Bla bla bla" />
<Control Type="Text" Id="CTM_CompanyDescriptionLbl" Width="197" Height="41" X="162" Y="135" Text="Bla bla bla" />
<Control Type="Text" Id="CTM_DialogTitleLbl" Width="126" Height="23" X="9" Y="15" Text="Bla bla bla" Transparent="yes" />
<Control Type="Text" Id="CTM_ProductDescriptionLbl" Width="197" Height="44" X="162" Y="66" Text="Bla bla bla" />
<Control Type="Text" Id="CTM_InstallerDescriptionLbl" Width="124" Height="64" X="9" Y="36" Text="Bla bla bla" Transparent="yes" />
<Control Type="RadioButtonGroup" Property="TYPEMACHINE_PROP" Id="CTM_TypeMachineRbtn" Width="213" Height="120" X="153" Y="48">
<RadioButtonGroup Property="TYPEMACHINE_PROP">
<RadioButton Text="Bla bla bla" Height="17" Value="1" Width="200" X="0" Y="0" />
<RadioButton Text="Bla bla bla" Height="17" Value="2" Width="200" X="0" Y="68" />
</RadioButtonGroup>
</Control>
<Control Type="PushButton" Id="CTM_NextBtn" Width="56" Height="17" X="237" Y="246" Text="Avanti >" Default="yes">
<Publish Order="1" Event="DoAction" Value="CA_GetNextDlg">1</Publish>
<Publish Order="2" Event="NewDialog" Value="[NEXT_DIALOG]">1</Publish>
<Publish Order="3" Value="[NEXT_DIALOG]" Property="CURRENT_DIALOG">1</Publish>
</Control>
<Control Type="PushButton" Id="CTM_BackBtn" Width="56" Height="17" X="179" Y="246" Text="< Back" Disabled="yes"></Control>
<Control Type="CheckBox" Id="CTM_NEWF_Cbx" Width="212" Height="17" X="153" Y="183" Text="!!!!- THIS IS THE NEW FEATURE -!!!!!" CheckBoxValue="1" Property="INSTALL_NEW_FEATURE" />
<Control Type="Text" Id="CTM_NEWF_DetailsLbl" Width="196" Height="21" X="162" Y="205" Text="Bla bla bla" />
</Dialog>
Thank you :)