Search code examples
wixinstallationwindows-installerwix-gui

Wix installation, server, client or both


I want create Wix installer to install, Client, Server or Both based on User selection.

My question is How can I restrict installing client when user selects Server (it gets installed as it has Level=1). I have customizied WixUI_Mondo.

I tried using Condition for Component but no luck.

<Feature Id="Client" Level="1">
    <ComponentRef Id="ClientMainExecutable" />
    <ComponentRef Id="ClientConfigurations" />
  </Feature>
  <Feature Id="Server" Level="3">
     <ComponentRef Id="ServerExecutable" />
     <ComponentRef Id="ServerConfigurations" />
  </Feature>
  <Feature Id="Both" Level="1000">
  </Feature>
</Feature>

<UIRef Id="myWixUI_Mondo" />

Solution

  • Please consider the danger of installing multiple software with the same setup as explained in this stackoverflow answer before pursuing more complex setup logic.

    For a product that isn't a "one time delivery" it is almost always better to split the setups for maintainability, quality assurance, localization and several conceptual and technical reasons. Especially server and client products that may have different upgrade schedules outright.

    Perhaps also have a look at this question and look at using Wix's Burn launcher to write more intelligent launching logic, or your own EXE launcher.

    Though your requirements look reasonably simple, it is almost hopeless to work with MSI's built in GUI if you have advanced requirements in my opinion. It is complicated, but not very flexible. Especially the lack of control with events and dialog updating is very frustrating.