I am trying to use the value retrieved from the checkbox to install a file. it is required to have this option since it is an optional extra for the software and thus is not always required.
I have a type 51 Custom Action to retrieve the data from the checkbox and store it in a property. however I have not yet managed to get it to function as the condition to install the file. this is the code I have now:
the checkbox:
<Control Id="Checkbox1" Type="CheckBox" X="20" Y="180" Width="140" Height="18" Property="SSP" CheckBoxValue="1" Text="Does the option require ssp.txt?"/>
the custom action:
<Property Id ="SSP" Secure ="yes">
<![CDATA[]]>
</Property>
<CustomAction
Id="SetSsp"
Property="SSP"
Value="ssp=[SSP]"
HideTarget="no">
</CustomAction>
<InstallExecuteSequence>
<Custom Action="SetSsp" Before="InstallFiles" />
</InstallExecuteSequence>
adding the file:
<Component Id="ssp.txt" Guid="{398937BD-4F46-47AA-9C02-B04ADEC3D072}">
<File Id ="ssp.txt" KeyPath="yes" Source="C:\Users\fjansen\Documents\MMI installatie bestanden\MMI install files\Windows Volume\ssp.txt" />
</Component>
I was thinking aboud using an if statement to check if the value = 1 and if true to install the file. however i didn't get it implemented and searched on the internet for a solution (with no result)
can anyone point me in the right direction or tell me what I am doing wrong?
thanks in advance.
Aucun commentaire:
Enregistrer un commentaire