0

Is it possible to have the root feature in the feature tree to not have tree lines so you can't expand and collapse it?

So the following feature tree:

<Feature Id="root" Level ="1" Title="Root" Display="expand" AllowAdvertise="no"
         ConfigurableDirectory="INSTALLDIR" Absent="disallow" TypicalDefault="install"
         InstallDefault="local">
  <Feature Id="child1" Title="Child 1"
           Level="1" Display="expand" AllowAdvertise="no"
           InstallDefault="local" >
    <ComponentGroupRef Id="SharedComponents" />
  </Feature>
  <Feature Id="child2" Title="Child 2"
           Level="1" Display="expand" AllowAdvertise="no"
           InstallDefault="local" >
    <ComponentGroupRef Id="SharedComponents" />
  </Feature>
  <Feature Id="childgroup1" Title="Child Group 1"
           Level="1" Display="expand" AllowAdvertise="no"
           InstallDefault="local" >
    <Feature Id="groupchild1" Title="Child 1"
             Level="1" Display="expand" AllowAdvertise="no"
             InstallDefault="local" >
      <ComponentGroupRef Id="SharedComponents" />
    </Feature>
    <Feature Id="groupchild2" Title="Child 2"
             Level="1" Display="expand" AllowAdvertise="no"
             InstallDefault="local" >
      <ComponentGroupRef Id="SharedComponents" />
    </Feature>
  </Feature>
</Feature>

Gives me this:

Feature Tree

But I'd rather not have the tree lines on the root element.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
vbtrek
  • 21
  • 4

1 Answers1

0

External GUI: I don't know of any way to remove the dotted lines, short of using an external GUI - which is possible (see this answer).

Hide Features: You can, however, set features to be hidden, in which case the sub-features won't show either. I am not sure exactly what you want.

Feature Four is hidden:

<Feature Id="One" Title="One" Level="1" >
  <Feature Id="Two" Title="Two" Level="1"/>
  <Feature Id="Three" Title="Three" Level="1">
    <Feature Id="ThreeOne" Title="ThreeOne" Level="1" >
    </Feature>
    <Feature Id="Four" Title="Four" Level="1"  Display="0" />
  </Feature>
</Feature>

MSI GUI: For the record I should point out that the MSI GUI is an old relic by now from a bygone era of computing (late 90s). As such the GUI isn't that easy to do much about, except to replace the whole thing as described in the link above(and from the MSI SDK: MsiSetExternalUI).

Tools such as Installshield and Advanced Installer will allow you to use template GUIs with more modern features, and WiX allows you to write your own GUI entirely as well: WIX Installer with modern look and feel (same link as above).

All the custom GUIs are based on the MsiSetExternalUI MSI API (as far as I know).

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164