I'm still struggling to hide a dialog button in an uninstallation case :\.

Since REMOVE="ALL" didn't seem to ever be "true" despite the path through
the installer (fresh install/repair/remove), I tried to base the
Action="hide" Condition off a Secure Property that can be modified earlier
in the code...

The result seems to be the same, REMOVE~="ALL" never is true, despite a
"REMOVE" path through the installer...

Given my setup below, how can I get the secure property
SHOWMODIFYCONFIGBUTTON to = 0 in the case of REMOVE paths through my
installer?

Here's my Property:
===================
<Property Id="SHOWMODIFYCONFIGBUTTON" Secure="yes" >1</Property>
===================

Here's the CustomAction that will modify the value of that property:
===================
<CustomAction Id="SetShowModifyConfigButton"
Property="SHOWMODIFYCONFIGBUTTON" Value="0" Execute="immediate"
Return="check" />
===================

Here's the InstallUI and InstallExecute Sequences:
===================
<InstallUISequence>
    <!-- This runs the App.Config Reader to load the session vars for
settings in the prompts -->
    <Custom Action="LoadDefaultOptions" After="CostFinalize" />

    <!-- This *should* set SHOWMODIFYCONFIGBUTTON to 0 during UNINSTALLATION
paths through the installer, but doesn't -->
    <Custom Action="SetShowModifyConfigButton"
After="MaintenanceWelcomeDlg">REMOVE~="ALL"</Custom>

</InstallUISequence>

<InstallExecuteSequence>
    <RemoveExistingProducts After="InstallFinalize"/>
    <!-- This will fail the installer if a newer installed version is
detected -->
    <Custom Action="NewerVersionDetected"
After="FindRelatedProducts">NEWERFOUND</Custom>
    <ScheduleReboot Suppress="yes"></ScheduleReboot>
</InstallExecuteSequence>
===================

Here's the dialog button I wish to hide during uninstalls:
===================
<Control Id="ApplicationSettings" Type="PushButton" X="94" Y="243"
Width="130" Height="17" Default="no" Cancel="no" Text="Modify Application
Settings" >
    <Condition Action="hide">SHOWMODIFYCONFIGBUTTON=0</Condition> <!-- Only
show this button when !Uninstalling -->
</Control>
===================




On Wed, Jul 14, 2010 at 10:17 AM, Jeremy Rimer <jeremyri...@gmail.com>wrote:

> I have one last problem before my installer is completely working:
>
> I have a custom EXIT dialog that I created called MyExitDialog that
> contains an extra button that spawns a custom dialog to gather application
> settings from the user to write into the App.Config file that was deployed
> and/or existed during installation or repair.
>
> The dialog does its job, but unfortunately it also displays (and does its
> job) after an application has been removed with the installer, which is
> useless, of course since there's no more app.config file to care about on a
> removal of the application.
>
> I see in the Publish elements how to conditionally control what a button *
> does*, but how do you conditionally control when a button *shows itself*in 
> its dialog?
>
> If this is impossible, how can I force the installer to display the
> standard WIX ExitDialog instead of MyExitDialog in the case of a REMOVE
> operation (vs. repair or new installation?).
>
> my MyExitDialog definition is as follows, and the Control with
> Id="ApplicationSettings" is my button I'd like to hide on product removals:
> ================================
> <Dialog Id="MyExitDialog" Width="370" Height="270"
> Title="!(loc.ExitDialog_Title)">
>         <Control Id="Finish" Type="PushButton" X="224" Y="243" Width="56"
> Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
>         <!-- The following Control allows us to go beyond finish to do some
> settings modifications -->
>         <Control Id="ApplicationSettings" Type="PushButton" X="94" Y="243"
> Width="130" Height="17" Default="no" Cancel="no" Text="Modify Application
> Settings" ></Control>
>         <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
> Height="17" Disabled="yes" Text="!(loc.WixUICancel)" />
>         <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370"
> Height="234" TabSkip="no" Text="!(loc.ExitDialogBitmap)" />
>         <!-- <Control Id="Back" Type="PushButton" X="224" Y="243"
> Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" /> -->
>         <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370"
> Height="0" />
>         <Control Id="Description" Type="Text" X="135" Y="70" Width="220"
> Height="40" Transparent="yes" NoPrefix="yes" Text=" Click the Finish button
> to exit the Setup Wizard. Alternatively, Click the Modify Application
> Settings button to alter the behavior of the application." />
>         <Control Id="Title" Type="Text" X="135" Y="20" Width="220"
> Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)"
> />
>         <Control Id="OptionalText" Type="Text" X="135" Y="110" Width="220"
> Height="80" Transparent="yes" NoPrefix="yes" Hidden="yes"
> Text="[WIXUI_EXITDIALOGOPTIONALTEXT]">
>           <Condition Action="show">WIXUI_EXITDIALOGOPTIONALTEXT AND NOT
> Installed</Condition>
>         </Control>
>         <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>
>       </Dialog>
> ================================
>
> Thanks again,
>
> Rimer
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to