3

I have instakllation i have to show the Dialog based on the checkbox value. I have set the checkbox property as true initially.

<Property Id="CHECKBOX_1_PROP" Value="TRUE" />

And show the dialog based on the check box values. If it is true i have to show the Newdoalog_1 if it is false i have to show the Setup dialog

<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="[ButtonText_Next]" TabSkip="no" Default="yes">
<Publish Event="SetTargetPath" Value="APPDIR">INSTALL</Publish>
<Publish Event="NewDialog" Value="NewDialog_1">INSTALL AND CHECKBOX_1_PROP="TRUE"</Publish>
<Publish Event="NewDialog" Value="SetupTypeDlg">INSTALL</Publish>
</Control>

<Control Id="CheckBox_1" Type="CheckBox" X="25" Y="164" Width="211" Height="26" Property="CHECKBOX_1_PROP" Text="Do you want to install the Samples" CheckBoxValue="CheckBox" TabSkip="no" Hidden="yes">
<Condition Action="show">INSTALL</Condition>
</Control>  

My Problem is always show the Setup Dialog that is False condition.

Pls help on this.

saschabeaumont
  • 22,080
  • 4
  • 63
  • 85
Velu
  • 887
  • 4
  • 14
  • 30

2 Answers2

3

I'm guessing your checkbox isn't setting the string literal "TRUE", check-boxes completely delete the property when unchecked. Setting that property to any value ("0", "true", "false", "-1") would cause it to be checked. So ignore the value, just check if the property exists or not.

<Publish Dialog="MyDlg" Control="Next" Event="NewDialog" Value="CustomDlg1">PROP1</Publish>
<Publish Dialog="MyDlg" Control="Next" Event="NewDialog" Value="CustomDlg2">Not PROP1</Publish>
saschabeaumont
  • 22,080
  • 4
  • 63
  • 85
  • Do you want to try answering another Wix question? http://stackoverflow.com/questions/19355537/wix-setting-install-folder-correctly/ – CodeMonkey Oct 15 '13 at 12:49
1

To get the SetupTypeDlg to only show when CHECKBOX_1_PROP <> "TRUE" the code should look something like this:

    <Publish Event="NewDialog" Value="SetupTypeDlg"><![CDATA[INSTALL AND CHECKBOX_1_PROP<>"TRUE"]]></Publish>
Friend Of George
  • 478
  • 1
  • 6
  • 16