[wix-users] Conditions on Feature Set

Brian Enderle brianke at gmail.com
Tue Aug 2 07:25:29 PDT 2016

I have the following Feature group that gets installed when a user selects
to do a 'Server' installation (vs a 'Client') installation:

    <!-- FoxPro Service Components to install, will only install if Server
option is selected in ClientServerDlg.wxs -->
    <Feature Id="ServiceFeature"

      <ComponentGroupRef Id="FoxProConnectServiceComponents" />
      <ComponentGroupRef Id="FoxProConfig" />
      <ComponentGroupRef Id="CLRComponents" />
      <ComponentRef Id="UpdateConfigFile_FoxPro" />


If the option to do a 'Server' install is selected, I would like to do a
check to see that FoxPro DLL is actually installed by searching the
registry.  Here is how I would do it at installer startup (under the
Product tag):

    <!-- check for existence of FoxPro OLEDB -->
    <Property Id="FOXPRO_OLEDB">
      <RegistrySearch Id="FoxProOLEDB"

                      Type="raw" />

    <!-- Don't care where FoxPro OLE DB is installed, just that it is -->
    <Condition Message="FoxPro OLEDB (VFPOLEDB) is required for this
      <![CDATA[Installed or (FOXPRO_OLEDB >< "")]]>

However, checking at startup will cause the program to exit before being
able to select the Client/Server option (done after InstallDirDlg).

Is it possible to add this condition to the "ServiceFeature" group and
maintain the Message or add this condition check to the 'Next' button on
the ClientServerDlg?  The big thing I would like to have is the pop-up
message that tells the user that the FoxPro DLL is missing.

Here is the code for the Next button and the RadioButtons on the

        <!-- Next button takes us to the Account Info dialog -->
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)">
          <!-- If Client option is selected, remove the FoxPro service from
installation -->
          <Publish Event="Remove"
Value="ServiceFeature">CLIENT_SERVER_INSTALL = 0</Publish>

        .  .  .  .

        <!-- Choose Client or Server installation -->
        <Control Id="ClientServerRadioButtonGroup" Type="RadioButtonGroup"
X="30" Y="63" Width="200" Height="100" Property="CLIENT_SERVER_INSTALL"
Text="Select Client or Server installation">
          <RadioButtonGroup Property="CLIENT_SERVER_INSTALL">
            <RadioButton Value="1" X="0" Y="0" Width="200" Height="10"
Text="Server" />
            <RadioButton Value="0" X="0" Y="20" Width="200" Height="10"
Text="Client" />



If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein

More information about the wix-users mailing list