4

There is a similar question

Edit context menu (selectiontree) in customize dialog?

but the link in the accepted answer states:

"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."

However, I have no subfeatures. How to remove the Entire feature... option?

Here's the code below:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
   <Product Id="*" Name="WixTestFeatureTree" Language="1033" Version="1.0.0.0" Manufacturer="TestManufacturer" UpgradeCode="bb04a635-6251-4fd5-8d2f-182d3441dc0a">
      <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

      <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
      <MediaTemplate />

      <UIRef Id="WixUI_FeatureTree" />
      <UIRef Id="WixUI_ErrorProgressText" />

      <Feature Id="ExeFeature" Title="The EXE file" Level="1">
         <Component Id="TheApp" Guid="*" Directory="INSTALLFOLDER">
            <File Id="TestExe" Source="Test.exe" Vital="yes"></File>
         </Component>
      </Feature>

      <Feature Id="PdfFeature" Title="The PDF file" Level="1">
         <Component Id="ThePDF" Guid="*" Directory="INSTALLFOLDER">
            <File Id="TestPDF" Source="Test.pdf" Vital="yes"></File>
         </Component>
      </Feature>
   </Product>

   <Fragment>
      <Directory Id="TARGETDIR" Name="SourceDir">
         <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="WixTestFeatureTree" />
         </Directory>
      </Directory>
   </Fragment>
</Wix>
Community
  • 1
  • 1
Edgar
  • 473
  • 1
  • 5
  • 19
  • This might help: http://stackoverflow.com/questions/1723840/customizing-text-in-the-standard-wix-dialogs – PhilDW Jan 22 '15 at 18:09
  • 2
    This will only change the text for UITextMenuAllLocal, but won't remove the entry from the list of options. – Edgar Jan 23 '15 at 06:20

2 Answers2

1

It looks Windows Installer always displays Entire feature will be installed on local hard drive item even if there are no subfeatures. At least this item was present in all the cases that I tested where there were no visible subfeatures. It could also depend on the version of Windows Installer, I tested in Windows 7 with all the latest updates.

I've always thought Windows Installer doesn't display Entire feature will be installed on local hard drive item for a feature which has no subfeatures. Latest tests proved I was wrong.

Alexey Ivanov
  • 11,541
  • 4
  • 39
  • 68
0

You need to add the UI type in order to have a different UI in the installer.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
   <Product Id="*" Name="WixTestFeatureTree" Language="1033" Version="1.0.0.0" Manufacturer="TestManufacturer" UpgradeCode="bb04a635-6251-4fd5-8d2f-182d3441dc0a">
      <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

      <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
      <MediaTemplate />

      <UI Id="MyWixUI_FeatureTree">
         <UIRef Id="WixUI_FeatureTree" />
      </UI>
      <UIRef Id="WixUI_ErrorProgressText" />

      <Feature Id="ExeFeature" Title="The EXE file" Level="1">
         <Component Id="TheApp" Guid="*" Directory="INSTALLFOLDER">
            <File Id="TestExe" Source="Test.exe" Vital="yes"></File>
         </Component>
      </Feature>

      <Feature Id="PdfFeature" Title="The PDF file" Level="1">
         <Component Id="ThePDF" Guid="*" Directory="INSTALLFOLDER">
            <File Id="TestPDF" Source="Test.pdf" Vital="yes"></File>
         </Component>
      </Feature>
    <UIRef Id="WixUI_Mondo"></UIRef>
   </Product>

   <Fragment>
      <Directory Id="TARGETDIR" Name="SourceDir">
         <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="WixTestFeatureTree" />
         </Directory>
      </Directory>
   </Fragment>
</Wix>

add <UIRef Id="WixUI_Mondo"></UIRef> , also add reference to WixUIExtension.dll

each feature has **Level**attribute, level=1 meaning the feature will be installed, if you change the level for 1000 for example the user can pick in the custom dialog weather he wants to install this feature or not

Gilad
  • 6,437
  • 14
  • 61
  • 119
  • I already have a reference to WixUIExtension.dll. Adding UIRef for both WixUI_Mondo and WixUI_FeatureTree only throws a lot of Duplicate symbol errors. I need the WixUI_FeatureTree not the WixUI_Mondo. – Edgar Jan 22 '15 at 07:41