[wix-users] advice please... [P]
Phill Hogland
phill.hogland at rimage.com
Thu Nov 5 06:43:50 PST 2015
>> Here is what I tried but doesn't work... can you not change a value of a WixVariable at runtime?
My understanding, at least the way have been able to use then, is that a WixVariable element is used to pass information to the Wix tools at link/bind time. I would use a Variable element to define an Burn Engine variable that I want to change at runtime. Since I don't have any experience with a UI in an MSI I will leave that part of your problem for others to advise.
If using a WixStdBA then use a BAFunctions.dll (from the sample in the wix toolset source) to implement Detect or Plan phase code to set the Burn Engine variable. The sample in the Wix toolset source has examples of doing this. Just declare the Variable element using Variable and bal:overridable=yes. I don't think that you want/need to use a WixVariable in this situation, since it is not a compile/link/bind time variable initialization.
As a side, my usage for WixVariable is when I put snippets of common code in wixlibs, and in that situation I use a WixVariable for paths, registry key names, or versions in the wixlib code that need to be different in different projects, at build time. The version is an example of something that must also be initialized prior to compile time, so in that case I initialize the WixVariable with a pre-processor (or MSBuild) variable (which is also not a Burn Engine variable) .
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Thursday, November 05, 2015 8:10 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>; sogilvie at msn.com
Subject: Re: [wix-users] advice please... [P]
Classification: Public
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:
>
> Classification: Public
> 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 9:09:29 AM.
The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.com.
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list