Wix disable directory browse button

We used CustomizeDlg from the Uix UI extensions library for the feature selection dialog, but a new requirement came up that said the browse button should be disabled if the software was updated.

So, I copied the wxs dialog file from the library to configure it by changing 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>

the problem is that the browse button never turns off, can someone indicate what I'm doing wrong here?

many thanks

+3
source share
2 answers

Windows UPGRADE. , , :

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

, .

, , ,

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

.

0

ConfigurableProperty Feature, , , , "" (, , , SelectionBrowse). , , -, hide , / . ; , Windows - WiX . , .

EDIT ( . )

SelectionBrowse, Browse. "" , :

<Control Id="Browse" Type="PushButton" X="294" Y="210" Width="66" Height="17" Text="!(loc.CustomizeDlgBrowse)">
  <Publish Event="SelectionBrowse" Value="BrowseDlg">NOT Installed AND NOT (UPGRADE = 1)</Publish>          
  <Condition Action="hide">Installed OR UPGRADE = 1</Condition>
  <Condition Action="disable">Installed OR UPGRADE = 1</Condition>
</Control>

, "" . , . , , , .

0

Source: https://habr.com/ru/post/1734902/


All Articles