[wix-users] Change a property in a Standard Dialog

George Legge george at haglis.co.uk
Wed Nov 4 04:02:36 PST 2015


Hi,

For those who are interested, I found a very simple solution to this issue.
(Why is it so often you find the solution after asking the question).

I changed the text to use a custom property and  then used a condition to
Show the text as detailed in "Customizing the ExitDlg" section in
http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.htm
l

Here is the code - 

<Control Id="CustomText" Type="Text" X="25" Y="68" Width="320" Height="18"
Transparent="yes" NoPrefix="yes" Text="[FEATURETEXT]" Hidden="yes" >
                  <Condition Action="show">FEATURETEXT AND NOT
IISMAJORVERSION</Condition>
 </Control>


George.




-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
George Legge
Sent: 04 November 2015 02:10
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Change a property in a Standard Dialog

Hi,

 

I have a requirement to add an additional line of text into the CustomizeDlg
to inform the user (our developers actually) that a particular Feature is
unavailable if they do not have IIS installed. It will still allow them to
install the other features, they just need to be informed of the fact. 

 

I have been able to add a new line quite easily but I need to either change
the text or switch from hidden=yes to hidden=no.

 

I simply added another Text line, under the existing Id="Text" line, which I
only want to display under certain circumstances.

 

I also created a Localization file with a with a new variable just for this
purpose. I also created a Custom Action to change the text from hidden=yes
to hidden=no, but this part does not work and I cant see how I can get this
to work. I also tried to simply change the text in the Loc.CustomizeDlgText1
in the localization file but couldn't get that to work either.

 

I realise this is a bit of a hack, but its all still in development and just
need it until I get a proper full on Custom BA done.

 

Here is the new definition I put into my customised CustomizeDlg - 

 

                <Control Id="CustomText" Type="Text" X="25" Y="68"
Width="320" Height="18" Text="!(loc.CustomizeDlgText1)" Hidden="yes" />

 

Here is the localization file, which has the en-us suffix too - 

 

                <?xml version="1.0" encoding="utf-8"?>

<WixLocalization Culture="en-us"
xmlns="http://schemas.microsoft.com/wix/2006/localization">

  <String Id="CustomizeDlgText1" Overridable="yes"><!--
_locID_text="CustomizeDlgText1" _locComment="CustomizeDlgText1" -->Test
text2.</String>

</WixLocalization>

 

Here is the customaction (I tried various "Before" options too) - 

 

                <CustomAction Id="NoIISText" Property="CustomizeDlgText1"
Value='"Hidden="yes"' Execute="immediate" />

 

    <!--Installation UI sequence configuration.-->

    <InstallUISequence>

      <Custom Action="NoIISText" Before="CostInitialize">NOT
IISMAJORVERSION</Custom>

    </InstallUISequence>

 

 

So if anyone can see what I am missing here, or if its not even possible or
if there is a better way to achieve this then I would be happy to hear from
you.

 

Many thanks, George.


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/



More information about the wix-users mailing list