views:

178

answers:

2

We have been using the CustomizeDlg from the wix UI extension library for the feature selection dialog box, but a new requirement has come up which states that the browse button should be disabled if the software is being updated.

So I copied the dialog wxs file from the library in order to customize it, changed the code as follows

<Control Id="Tree" Type="SelectionTree" X="25" Y="85" Width="175" Height="115" Property="_BrowseProperty" Sunken="yes" TabSkip="no" Text="!(loc.CustomizeDlgTree)"  />
    <Control Id="Browse" Type="PushButton" X="294" Y="210" Width="66" Height="17" Text="!(loc.CustomizeDlgBrowse)">
      <Publish Event="SelectionBrowse" Value="BrowseDlg">1</Publish>          
      <Condition Action="hide">Installed</Condition>
      <Condition Action="disable">UPGRADE = 1</Condition>
    </Control>

problem is that the browse button never gets disabled, can someone point out what i am doing wrong here ?

many thanks

A: 

According to the Windows Installer Property Reference, there simply is no UPGRADE property. To verify that this is the problem, run your installer with logging options from the command line like this:

msiexec /lvx* logfile.txt /i myinstaller.msi

The log file will show the value of all properties used during the upgrade.

The condition you are looking for is probably

<Condition Action="disable">UPGRADINGPRODUCTCODE</Condition>

but I have not tested it.

Wim Coenen
UPGRADE property is something i added, which is being set correctly, the problem is that even when the property is set, the browse button is still enabled
A: 

If you are setting the ConfigurableProperty attribute for the Feature element you are trying to install, it seems to prevent modifying the state of the Browse button (or potentially any control associated with the SelectionBrowse event). You can modify the state once it is installed seemingly, which is why the hide action will work if you are trying to change/remove the feature. I have not found a way around it; I am not sure if this is a Windows Installer construct or something in WiX at fault. I am assuming the former for now.

David J. Antoine

related questions