0
I want to use an MSI installer property in a condition message in a WiX installer. This MSI property is set by a C++ custom action. I can set and get the same MSI property and value before calling the condition message, but it is failing when I use it in condition message.
My condition message is looks like
<CustomAction Id="CustomAction1" BinaryKey="CustomDLL"
DllEntry="CustomAction1" Execute="immediate" Return="check" />
<InstallUISequence>
<Custom Action="CustomAction1" Before="LaunchConditions">Not Installed</Custom>
</InstallUISequence>
<InstallExecuteSequence >
<Custom Action="CustomAction1" Before="LaunchConditions">Not Installed</Custom>
</InstallExecuteSequence>
<Condition Message="message comes here.">
<![CDATA[(MyProperty= "NO")]]>
</Condition>
Here this MyProperty is a string and returns either YES or NO, and it is set by C++ CA and this condition is failing in both cases. But I want to show this message only when the MyProperty is set to "NO".
So how do I use my custom MSI property in a condition message that was set by a custom action?
This answer relates to a more complicated scenario where you need to retrieve the property in question in deferred mode - in which case it has to be written into the execution script, and retrieved via the special CustomActionData property. Quite clunky, and probably not what the OP asked about in this case. See my new answer instead. – Stein Åsmul – 2018-05-24T23:09:31.113