Abort installation by condition without displaying message box

Viewed 38

With the wix installer I want to check if an registry entry is set. If it is not set I want to abort the installation process without displaying a message dialog.

I use the Condition element to check if the entry is there and abort the installation, but this element requires an Message attribute, which is then displayed in an message box.

I want to ignore this message box and silently abort the installation.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <Property Id="Property_XXX">
      <RegistrySearch 
         ...
         ...
         ...
      </RegistrySearch>   
    </Property>
    
    <Condition Message="This message should not be displayed">
      <![CDATA[Installed OR Property_XXX]]>
    </Condition>

    <SetProperty Id="Dir.ProgramDir.xxx" Value="[Property_XXX]" After="CostInitialize"/> 
  </Fragment>
</Wix>

Message box should be ignored

Is there a simple way to abort and installation (like with the Condition element), but without displaying a message box?

1 Answers
Related