You have to specify what action the condition will invoke. In this case, I would assume you would use Action="hide" in your Condition element under your control.
<Control Id="ApplicationSettings" Type="PushButton" X="94" Y="243" Width="130" Height="17" Default="no" Cancel="no" Text="Modify Application Settings" ><Condition Action="hide">REMOVE=ALL</Condition></Control> -----Original Message----- From: Jeremy Rimer [mailto:jeremyri...@gmail.com] Sent: Wednesday, July 14, 2010 11:19 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Conditionally Show Dialog Button based on Installer action (installed vs. removed vs. repaired, etc) Here's MyExitDialog: ================ <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> ================ If I try to put a conditional in the Control element, I get WIX compile errors... How do you control the display of a button in a dialog conditionally? On Wed, Jul 14, 2010 at 1:11 PM, Blair <os...@live.com> wrote: > Use MyExitDialog always, and hide the button in that dialog that runs your > CA. > > -----Original Message----- > From: Jeremy Rimer [mailto:jeremyri...@gmail.com] > Sent: Wednesday, July 14, 2010 11:04 AM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Conditionally Show Dialog Button based on > Installer > action (installed vs. removed vs. repaired, etc) > > To be more specific... > > It seems that with <![CDATA[REMOVE<>"ALL"]]> in there, It shows the > MyExitDialog in BOTH scenarios... > > I even tried putting something like this in: > ================== > <InstallUISequence> > <Show Dialog="MyExitDialog" > OnExit="success"><![CDATA[REMOVE<>"ALL"]]></Show> > <Show Dialog="ExitDialog" > OnExit="success"><![CDATA[REMOVE="ALL"]]></Show> > </InstallUISequence> > > <AdminUISequence> > <Show Dialog="MyExitDialog" OnExit="success" > ><![CDATA[REMOVE<>"ALL"]]></Show> > <Show Dialog="ExitDialog" > OnExit="success"><![CDATA[REMOVE="ALL"]]></Show> > </AdminUISequence> > ================== > > But I'm getting "The InstallUISequence table contains an action > 'ExitDialog' > that is declared in two different locations. Please remove one of the > actions or set the Overridable='yes' attribute on one of their elements." > errors when I do this... > > Additionally, it seems to always do the same thing either way... it either > shows MyExitDialog in both situations (remove/install), or shows NO exit > dialog, and skips that step and auto-finishes and closes the installer once > the program completes ... > > -J > > > > > On Wed, Jul 14, 2010 at 12:57 PM, Jeremy Rimer <jeremyri...@gmail.com > >wrote: > > > Hmmm... > > > > I did this: > > =================== > > <InstallUISequence> > > <Show Dialog="MyExitDialog" > > OnExit="success"><![CDATA[REMOVE=ALL]]></Show> > > </InstallUISequence> > > > > <AdminUISequence> > > <Show Dialog="MyExitDialog" OnExit="success" > > ><![CDATA[REMOVE=ALL]]></Show> > > </AdminUISequence> > > =================== > > > > and it still shows it on both install and uninstall... > > > > I put "ALL" in quotes, and it DOESNT show it on install... :( > > > > -J > > > > > > > > On Wed, Jul 14, 2010 at 12:33 PM, Blair <os...@live.com> wrote: > > > >> Condition the button to be hidden if REMOVE=ALL ? > >> > >> -----Original Message----- > >> From: Jeremy Rimer [mailto:jeremyri...@gmail.com] > >> Sent: Wednesday, July 14, 2010 9:25 AM > >> To: General discussion for Windows Installer XML toolset. > >> Subject: Re: [WiX-users] Conditionally Show Dialog Button based on > >> Installer > >> action (installed vs. removed vs. repaired, etc) > >> > >> Unfortunately not with the way it is currently written... > >> > >> This custom MyExitDialog occurs at the right time during every run of > the > >> installer, in lieu of the WIX standard ExitDialog. I have a button on it > >> that spawns an extra dialog (if you don't press finish instead, which > >> quits > >> the installer), which then spawns the configuration input dialog for > users > >> to modify some database settings before exiting the installer... I need > to > >> either NOT SHOW that button, or show the standard WIX ExitDialog in the > >> case > >> of a removal path... > >> > >> On Wed, Jul 14, 2010 at 11:06 AM, Blair <os...@live.com> wrote: > >> > >> > Could your custom action be written such that it simply exits early > with > >> a > >> > success code if it doesn't find the App.Config file? > >> > > >> > -----Original Message----- > >> > From: Jeremy Rimer [mailto:jeremyri...@gmail.com] > >> > Sent: Wednesday, July 14, 2010 8:25 AM > >> > To: General discussion for Windows Installer XML toolset. > >> > Subject: Re: [WiX-users] Conditionally Show Dialog Button based on > >> > Installer > >> > action (installed vs. removed vs. repaired, etc) > >> > > >> > I must also add that under my custom exit dialog, I have this: > >> > ============================================== > >> > <InstallUISequence> > >> > <Show Dialog="MyExitDialog" > >> > OnExit="success"><![CDATA[INSTALLED]]></Show> > >> > </InstallUISequence> > >> > > >> > <AdminUISequence> > >> > <Show Dialog="MyExitDialog" OnExit="success" > >> > ><![CDATA[INSTALLED]]></Show> > >> > </AdminUISequence> > >> > ============================================== > >> > ... but this just causes NO exit dialog to show in both Install and > >> Remove > >> > paths of the installer :( > >> > -Jeremy > >> > > >> > > >> > 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 > >> > > >> > > >> > > >> > > >> > >> > > ---------------------------------------------------------------------------- > >> -- > >> > 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 > >> > > >> > >> > > ---------------------------------------------------------------------------- > >> -- > >> 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 > >> > >> > >> > >> > > ---------------------------------------------------------------------------- > -- > >> 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 > >> > > > > > > ---------------------------------------------------------------------------- > -- > 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 > > > > ---------------------------------------------------------------------------- -- > 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 > ---------------------------------------------------------------------------- -- 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 ------------------------------------------------------------------------------ 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