[wix-users] advice please... [P]

Steven Ogilvie Steven.Ogilvie at titus.com
Thu Nov 5 13:27:41 PST 2015


Classification: Public
I did this and it is working wonderfully now:

<Control Id="LicenseText_Server" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Hidden="yes" Disabled="yes" Sunken="yes" TabSkip="no">
          <Text SourceFile="$(var.resourcePath)\TS_EULA_Text.rtf" />
          <Condition Action="enable">SERVERLESSINSTALL = "0"</Condition>
          <Condition Action="show">SERVERLESSINSTALL = "0"</Condition>
        </Control>
        <Control Id="LicenseText_Serverless" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Hidden="yes" Disabled="yes" Sunken="yes" TabSkip="no">
          <Text SourceFile="$(var.resourcePath)\TS_AC_EULA_Text.rtf" />
          <Condition Action="enable">SERVERLESSINSTALL = "1"</Condition>
          <Condition Action="show">SERVERLESSINSTALL = "1"</Condition>
        </Control>

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Joel Budreau
Sent: November-05-15 3:52 PM
To: sogilvie at msn.com
Cc: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] advice please...

If you look into the wix source file LicenseAgreementDlg.wxs you'll see this Control element:

                <Control Id="LicenseText" Type="ScrollableText" X="20"
Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">
                    <Text
SourceFile="!(wix.WixUILicenseRtf=$(var.licenseRtf))" />
                </Control>

The LicenseText control has it's @Text attribute populated at build time with a path to a rtf file. If you want, you can copy this entire dialog to your source tree, rename the dialog, and modify it to suit your design.
You'd basically add another <Control> element that displays the other EULA and conditionally show/hide the Controls based on SERVERLESSINSTALL:

                <Control Id="LicenseText_Server" Type="ScrollableText"
X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">
                    <Condition
Action="show">SERVERLESSINSTALL<>1</Condition>
                    <Condition Action="hide">SERVERLESSINSTALL=1</Condition>
                    <Text SourceFile="$(var.ServerLicenseFile)" />
                </Control>
                <Control Id="LicenseText_Serverless" Type="ScrollableText"
X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">
                    <Condition Action="show">SERVERLESSINSTALL=1</Condition>
                    <Condition
Action="hide">SERVERLESSINSTALL<>1</Condition>
                    <Text SourceFile="$(var.ServerlessLicenseFile)" />
                </Control>

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Thursday, November 5, 2015 6:10 AM
To: WiX Toolset Users Mailing List; sogilvie at msn.com
Subject: Re: [wix-users] advice please...
Sigh,

Here is what I tried but doesn't work... can you not change a value of a WixVariable at runtime?

<WixVariable Overridable="yes" Id="WixUILicenseRtf"
Value="$(var.resourcePath)\TS_AC_EULA_Text.rtf" />

<CustomAction Id="CA_Set_EULA_SERVERLESS" Property="WixUILicenseRtf"
Value="$(var.resourcePath)\TS_AC_EULA_Text.rtf"/>
<CustomAction Id="CA_Set_EULA_SERVER" Property="WixUILicenseRtf"
Value="$(var.resourcePath)\TS_EULA_Text.rtf"/>

<InstallUISequence>
      <Custom Action="CA_Set_EULA_SERVERLESS" After="CostFinalize">NOT Installed AND SERVERLESSINSTALL="1"</Custom>
      <Custom Action="CA_Set_EULA_SERVER" After="CostFinalize">NOT Installed AND SERVERLESSINSTALL="0"</Custom>

Looking at the log file:

Action 9:00:17: CA_Set_EULA_SERVER. 
Action start 9:00:17: CA_Set_EULA_SERVER.
MSI (c) (AC:1C) [09:00:17:259]: PROPERTY CHANGE: Adding WixUILicenseRtf property. Its value is 'C:\Dev\Core Technologies\Main\Setup\Admin_Console_Setup\..\Resources\TS_EULA_Text.rtf'.
Action ended 9:00:17: CA_Set_EULA_SERVER. Return value 1.
MSI (c) (AC:1C) [09:00:17:259]: Skipping action: CA_Set_EULA_SERVERLESS (condition is false)

Property(C): WixUILicenseRtf = C:\Dev\Core Technologies\Main\Setup\Admin_Console_Setup\..\Resources\TS_EULA_Text.rtf


Would I have to store them in the binary table?

Steve

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Joel Budreau
Sent: November-04-15 6:42 PM
To: sogilvie at msn.com
Cc: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] advice please.

SERVERLESSINSTALL is a run-time property. These <?if?> statements are evaluated at build time. Since both prove to be false, wix falls back to the default EULA shipped with wix.

> On Nov 4, 2015, at 3:27 PM, Steven Ogilvie <Steven.Ogilvie at titus.com>
wrote:
> 
> Why can't I do something simple like this:
> 
> <?if SERVERLESSINSTALL = 1 ?>
>    <WixVariable Overridable="yes" Id="WixUILicenseRtf"
Value="$(var.resourcePath)\TS_AC_EULA_Text.rtf" />
>    <?endif ?>
>    <?if SERVERLESSINSTALL = 0 ?>
>    <WixVariable Overridable="yes" Id="WixUILicenseRtf"
Value="$(var.resourcePath)\TS_EULA_Text.rtf" />
>    <?endif ?>
> 
> Running this ignores my setting WixUILicenseRtf and uses the default 
> license that comes with Wix :(
> 
> Steve
> 
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Steven Ogilvie
> Sent: November-04-15 5:37 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>; 
> sogilvie at msn.com
> Subject: Re: [wix-users] advice please...
> 
> Joel,
> 
> Great idea, I didn't even think of that :)
> 
> Thanks,
> 
> Steve
> 
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Joel Budreau
> Sent: November-04-15 5:29 PM
> To: sogilvie at msn.com
> Cc: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] advice please...
> 
> You could just create two LicenseAgreement Dialogs (one for each EULA) 
> and
display the correct one based on an MSI property.
> 
>> On Nov 4, 2015, at 1:57 PM, Steve Ogilvie <sogilvie at msn.com> wrote:
>> 
>> Hi folks,
>> I have 1 MSI that can be two "different" products.
>> I have a bunch of MSI properties that I call in the Bundle that 
>> determine
what type of install to run.
>> I would like to be able to use "tell" the MSI which EULA to use. I 
>> have
tried various methods without success...
>> So the installer could use 2 different EULA's depending if it is a
"server" based or "serverless" based install.
>> Has anyone been able to do this? (use a different EULA via a property
>> etc.) Thanks,
>> Steve 		 	   		  
>> 
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>
 

 



 
This message has been marked as Public by Steven Ogilvie on November-05-15 4:27:41 PM.

The above classification labels were added to the message by TITUS Message Classification. 
For more information visit www.titus.com.



More information about the wix-users mailing list