Reputation: 697
this thing drives me mad.
What I have is a custom Exit dialog with some controls on it. Here is the source:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="MyExitDialog" Width="370" Height="220" Title="!(loc.ExitDialog_Title)">
<Control Id="Finish" Type="PushButton" X="236" Y="200" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="200" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUICancel)" />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.DiskCostDlgBannerBitmap)" />
<Control Id="InstallText" Type="Text" X="25" Y="53" Width="330" Height="50" Text="Product [ProductName] was successfully installed" >
<Condition Action="show">NOT Installed</Condition>
</Control>
<Control Id="UninstallText" Type="Text" X="25" Y="53" Width="330" Height="50" Text="Product [ProductName] was successfully removed." >
<Condition Action="show">Installed</Condition>
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="Back" Type="PushButton" X="180" Y="200" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
<Control Id="BottomLine" Type="Line" X="0" Y="190" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogDescription)" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" />
<Control Id="LaunchAfterExitCheckBox" Type="CheckBox" X="25" Y="145" Width="330" Height="18" CheckBoxValue="1" Property="LAUNCHAFTEREXIT" Text="Run application after installation" >
<Condition Action="show">NOT Installed</Condition>
</Control>
</Dialog>
<InstallUISequence>
<Show Dialog="MyExitDialog" OnExit="success" Overridable="yes" />
</InstallUISequence>
<AdminUISequence>
<Show Dialog="MyExitDialog" OnExit="success" Overridable="yes" />
</AdminUISequence>
</UI>
</Fragment>
</Wix>
Those of you beeing familiar with the WIX sources will easily recognize that I have cloned the ExitDialog contained in WIX, and given it the same layout as almost all other dialogs (horizontal banner on top), to work around the "letterbox" bug (Windows background shining through controls). Now the problem is, that die "Launch application" Checkbox does appear on install and on uninstall, seems the condition has no effect. I can, however, successfully tick and untick the checkbox by setting the LAUNCHCONDITION property, so tehre is some live in this thing. The whole issue is somewhat weird, because 10 lines futher up I use the exactly same condition to switch texts between "InstallText" and "UninstallText", and this works just fine.
This is the original code from the ExitDialog:
<Control Id="OptionalCheckBox" Type="CheckBox" X="135" Y="190" Width="220" Height="40" Hidden="yes" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" CheckBoxValue="1" Text="[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]">
<Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed</Condition>
</Control>
OK, they have another condition AND-ed, which doesn't exist in my project, but so what? My condition should work nicely, but it doesn't. I have been staring at those few lines for hours now, and tried this and that, no success.
What am I missing???
Thx, Armin.
Upvotes: 0
Views: 375
Reputation: 15905
Your conditions are on "show" actions. However, all controls start visible, so what you really need are actions to hide them. It's not a bad idea to have both actions on each control with complementary conditions (that is, to keep your show actions), although in this case it likely won't matter.
Upvotes: 1