For example:
Scenario:
Show message box only during installation and MYPROPERTY has to be equal to "TestValue".
1> Define custom action
<CustomAction Id="POPMSG " Script="vbscript">
<![CDATA[MsgBox("For Custom Action POPMSG.")]]>
</CustomAction>
2> Put this custom action inside <InstallExecuteSequence></InstallExecuteSequence> or <InstallUISequence></InstallUISequence>
<Custom Action="POPMSG" Before="CostInitialize" >
<![CDATA[MYPROPERTY="TestValue" AND NOT Installed]]>
</Custom>
Reference:
http://*.com/questions/8239188/wix-show-conditional-message-box-without-cancel