I finally found a solution to this at
http://www.joyofsetup.com/2007/05/30/feature-conditions-and-ui/ and am
posting my solution should anyone in the future find this post.
In my main file (Product.wxs) the components to install are defined as
follows:
<!-- Identify ComponentGroups to be installed -->
<Feature Id="ProductFeature" Title="HRActions Setup" Level="1"
ConfigurableDirectory="INSTALL_FOLDER">
<ComponentGroupRef Id="BinComponents" />
<ComponentGroupRef Id="ConfigComponents" />
<ComponentGroupRef Id="ScriptComponents" />
<ComponentRef Id="HRActionsFolderPermssions" />
<ComponentRef Id="ProgramMenuDir" />
<!-- The /web components are generated automatically using pre-build
event -->
<ComponentGroupRef Id="HRActionsComponents" />
<ComponentGroupRef Id="HRActionsComponentsSS" />
<!-- Create a separate 'Feature' so that we can selectively remove it
using 'InstallWebAppDlg' -->
<Feature Id="IISInstallation" Level="1">
<ComponentGroupRef Id="HRActionsWebsiteIISConfiguration" />
</Feature>
</Feature>
I have a custom UI screen (InstallWebAppDlg.wxs) that asks if the user
wants the default IIS setup installed. If the user selects No the 'Next'
button control removes the feature 'IISInstallation'
<Fragment>
<UI>
<Property Id="CONFIGURE_IIS_YES_NO" Secure="yes" Value="0" />
<Dialog Id="InstallWebAppPoolDlg" Width="370" Height="270"
Title="[ProductName] Setup" NoMinimize="yes">
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
Height="17" Text="&Back">
<Publish Event="NewDialog" Value="AcctInfoDlg">NOT
Installed</Publish>
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="&Next">
<!-- AddLocal=ALL tells the installer to install all the features
specified -->
<!-- The feature 'IISInstallation' (found in Product.wxs) is
Removed from installation if the NO radio button is selected -->
<Publish Event="AddLocal" Value="ALL">1</Publish>
<Publish Event="Remove"
Value="IISInstallation">CONFIGURE_IIS_YES_NO = 0</Publish>
<Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="Description" Type="Text" X="25" Y="23" Width="280"
Height="15" Transparent="yes" NoPrefix="yes" Text=" " />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200"
Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}ISS
Configuration" />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370"
Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370"
Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370"
Height="0" />
<Control Id="DescriptionLabel" Type="Text" X="20" Y="60"
Width="290" Height="13" Text="By default, this installation will create a
dedicated web site with its own application pool and virtual directories to
maximize performance and reduce unwanted interactions." />
<Control Id="ConfigureIISRadioButtonGroup" Type="RadioButtonGroup"
X="30" Y="94" Width="305" Height="100" Property="CONFIGURE_IIS_YES_NO"
Text="?">
<RadioButtonGroup Property="CONFIGURE_IIS_YES_NO">
<RadioButton Value="1" X="0" Y="0" Width="200" Height="10"
Text="Yes, please create the default IIS configuration." />
<RadioButton Value="0" X="0" Y="20" Width="200" Height="10"
Text="No thanks, I will configure IIS myself later." />
</RadioButtonGroup>
</Control>
</Dialog>
</UI>
</Fragment>
Brian
If you can't explain it simply, you don't understand it well enough. -
Albert Einstein
On Thu, Jan 9, 2014 at 7:33 AM, Brian Enderle <[email protected]> wrote:
> I have the following components that get installed:
>
> <!-- Identify ComponentGroups to be installed -->
> <Feature Id="ProductFeature" Title="HRActions Setup" Level="1"
> ConfigurableDirectory="INSTALL_FOLDER">
>
> <ComponentGroupRef Id="BinComponents" />
> <ComponentGroupRef Id="ConfigComponents" />
> <ComponentGroupRef Id="ScriptComponents" />
> <ComponentRef Id="HRActionsFolderPermssions" />
> <ComponentRef Id="ProgramMenuDir" />
>
> <!-- The /web components are generated automatically using pre-build
> event -->
> <ComponentGroupRef Id="WebsiteComponents" />
> <ComponentGroupRef Id="WebsiteIISConfiguration" />
>
> </Feature>
>
>
> I have implemented a UI screen that implements two radio buttons that ask
> the user if they want the IIS configuration setup for them as follows:
>
> <Property Id="CONFIGURE_IIS_YES_NO" Secure="yes" Value="0" />
>
> ...
>
> <Control Id="ConfigureIISRadioButtonGroup" Type="RadioButtonGroup"
> X="30" Y="94" Width="305" Height="100" Property="CONFIGURE_IIS_YES_NO"
> Text="?">
> <RadioButtonGroup Property="CONFIGURE_IIS_YES_NO">
> <RadioButton Value="1" X="0" Y="0" Width="200" Height="10"
> Text="Yes, please create the defualt IIS configuration." />
> <RadioButton Value="0" X="0" Y="20" Width="200" Height="10"
> Text="No thanks, I will configure IIS myself later." />
> </RadioButtonGroup>
> </Control>
>
>
> Can I set something on <ComponentGroupRef Id="WebsiteIISConfiguration" />
> or <ComponentGroup Id="WebsiteIISConfiguration"> that would read
> CONFIGURE_IIS_YES_NO and only perform the setup within <ComponentGroup
> Id="HRActionsWebsiteIISConfiguration"> if CONFIGURE_IIS_YES_NO is YES?
>
>
> Brian
>
> If you can't explain it simply, you don't understand it well enough. -
> Albert Einstein
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users