Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix how to hide feature options

I'm using Wix 3.5 to build a MSI installer. I want to know if there is any way to hide some options from the "Features Custom Setup dialog" (in which you select from the Feature tree what to install).

I want to only have the options for "Will be installed on local hard drive" and "Entire feature will be unavailable"

Currently, apart from those two options i have these options:

  • "Entire feature will be installed on local hard drive"
  • "Will be installed to run from network"
  • "Entire feature will be installed to run from network"
like image 213
Herno Avatar asked Oct 17 '12 16:10

Herno


1 Answers

Feature selection dialog uses SelectionTree control, a built-in control of the Windows Installer.

You can control which installation options are displayed for a feature using Attributes column of the Feature Table.

Feature element of WiX has four properties which control how a feature can be installed:

  • Absent: allow / disallow
  • AllowAdvertise: no / system / yes
  • InstallDefault: followParent / local / source
  • TypicalDefault: advertise / install

Component table also controls whether the component can be run from source or not. The Component element has Location property:

  • local
    Prevents the component from running from the source or the network (this is the default behavior if this attribute is not set).
  • source
    Enforces that the component can only be run from the source (it cannot be run from the user's computer).
  • either
    Allows the component to run from source or locally.

So to remove the option to run from the network, set Location property of your components to local.

You cannot remove Entire feature will be installed on local hard drive from the options. It is displayed only when there are subfeatures and enables installation of the subfeatures as well as the feature itself as opposed from Will be installed on local hard drive which installs only the selected features and does not affect subfeatures.

If the subfeatures are always installed with the parent, you can try to set InstallDefault attribute of the subfeatures to followParent.

like image 96
Alexey Ivanov Avatar answered Oct 05 '22 09:10

Alexey Ivanov