views:

177

answers:

4

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.

A: 

Sorry for missing the Code snippet of the 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 Essential Studio Samples" CheckBoxValue="CheckBox" TabSkip="no" Hidden="yes">
            <Condition Action="show">INSTALL</Condition>
        </Control>
Velu
A: 

Hi Please remove the space between the first and the second line..see the code below

INSTALL INSTALL AND CHECKBOX_1_PROP="TRUE" INSTALL
INSTALL
VAC-Prabhu
A: 

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>
sascha
A: 

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

related questions