Search code examples
wix

Wix Publish element Condition Value


In a Wix 'Publish' element:

          <Publish Property="_BrowseProperty" Value="PROGRAM_FILES_ROOT" Order="2">1</Publish>

What does the '1' do?

What does the Order="2" do?

I somewhat understand what Order="2" does, but I completely don't understand what the 1 does in the condition field.

I have scoured the internet trying to understand this, and I don't find any useful information.

I have tried experimenting by putting different values in where the '1' is. I have found that leaving it out can generate an error, but I don't see any difference as long as there is a value there.


Solution

  • The 1 is used to represent "true". The text of the Publish element is the condition controlling the publishing of the event. For some reason, the Windows Installer engine needs a condition.

    In WiX v4, this is handled for you. It will add the 1 if you don't specify a condition.

    Order controls the order in which the events are published. The default order is the order that you place them in the file.