[wix-users] Help needed, dialog condition not working

Michael Urman murman at gmail.com
Sat Dec 2 16:35:46 PST 2017


Hi Armin,

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.

Michael

On Dec 2, 2017 11:44, "Armin Linder via wix-users" <
wix-users at lists.wixtoolset.org> wrote:

> I all,
>
> I have a really weird problem, which has now cost me half of a week of
> time, and work needs to be done till Monday, so I am finally asking your
> help.
>
> The problem is, that, despite what the docs say, my dialogs seem to ignore
> condiions.
>
> I have authored some dialogs, like for instance:
>
> <?xml version="1.0" encoding="utf-8"?>
> <!-- Copyright (c) .NET Foundation and contributors. All rights reserved.
> Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in
> the project root for full license information. -->
> <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="Das Produkt [ProductName] wurde erfolgreich
> installiert." >
>                     <Condition Action="show">NOT Installed</Condition>
>                 </Control>
>                 <Control Id="UninstallText" Type="Text" X="25" Y="63"
> Width="330" Height="50" Text="Unser Produkt [ProductName] wurde erfolgreich
> de-installiert." >
>                     <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="[ProductName] im Anschluss an die
> Installation starten" >
>                     <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>
>
> For the InstallText and IninstallText controls, I used conditions to
> filter, so InstallText should appear if the product is installed, and
> UninstallText should appear if the product is removed.
>
> Instead, I do always get both texts displayed. !? This screenshot was
> taken after a successful uninstakll:
>
> The same problem affects the LaunchAfterinstallCheckBox, which is visible
> on install and on uninstall.
>
> I have two more dialogs, displayed before installation starts, which show
> the same odd behaviour.
>
> Any thoughts what causes this really weird failure of the "Installed"
> property, and how I can fix this?
>
> *Thanks,
>
> Armin.
> *
> *Armin Linder*
> Mozartstrasse 12
> 84539 Zangberg
>
> Tel: ++49 8636 9999180
> Fax: ++49 8636 9999185
> Mobil: ++49 170 8048096
>
>
> ---
> Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
> https://www.avast.com/antivirus
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/


More information about the wix-users mailing list