Would like to incorporate the conditional component installation based on a property value set in a custom action. Here's what I've attempted:
If the condition is True, Install the file else skip the installation on the particular file.
Set the session property using the statement: session[$"MyProperty"]="somevalue". This successfully updates the session value. I then utilized 'MyProperty' for a component condition:
Code: Select all
<Component Id="mycomp" Guid="">
<File Id="fileid" Source="SomeRandomFile" />
<Condition><![CDATA[MyProperty = "somevalue"]]></Condition>
</Component>
Code: Select all
<Binary Id="BID" SourceFile="path.CA.dll" />
<CustomAction Id="MYCA" BinaryKey="BID" DllEntry="MYCA" Execute="immediate" Return="check" />
Code: Select all
<InstallExecuteSequence>
<Custom Action="MYCA" Before="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>
I'm uncertain about what might be causing the issue. Can someone provide guidance on how to achieve the desired outcome?