[wix-users] WixVariable in a separate wxs

Edwin Castro egcastr at gmail.com
Wed Jan 31 14:15:47 PST 2018


Rob's exactly right!

I'll repeat what I said earlier, "The code sample really depends on what
you have in the Fragment(s) containing WixUIBannerBmp and WixUIDialogBmp.
... So if *I don't have anything I can reference*, then ..."

If you have a UI element in the Fragment containing WixUIBannerBmp and/or
WixUIDialogBmp, then just use UIRef. If there is another element you can
reference, then reference that element.

Don't do my property hack unless you don't have any other options.

--
Edwin G. Castro


On Wed, Jan 31, 2018 at 11:39 AM, Rob Mensching <rob at firegiant.com> wrote:

> UIRef?
>
> _____________________________________________________________
>  Short replies here. Complete answers over there:
> http://www.firegiant.com/
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Edwin Castro via wix-users
> Sent: Wednesday, January 31, 2018 10:21 AM
> To: Ven H <venh.123 at gmail.com>
> Cc: Edwin Castro <egcastr at gmail.com>; WiX Toolset Users Mailing List <
> wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] WixVariable in a separate wxs
>
> The code sample really depends on what you have in the Fragment(s)
> containing WixUIBannerBmp and WixUIDialogBmp. Remember that when you
> reference anything inside a Fragment you get everything in that Fragment.
> So if I don't have anything I can reference, then I create an arbitrary
> Property used just for referencing.
>
> <Fragment>
>     <!-- Contains other stuff like WixUIBannerBmp and/or WixUIDialogBmp -->
>     <Property Id="DoesNotMatterButWillShowUpInPropertyTable"
> Value="DoesNotMatter"/>
> </Fragment>
>
> Then in another <Fragment> or <Product> I simply reference the Property:
>
> <Product ...>
>     <!-- other stuff that goes in Product -->
>     <PropertyRef Id="DoesNotMatterButWillShowUpInPropertyTable"/>
> </Product>
>
> I choose an Id that has some meaning for me but isn't too esoteric. I
> usually just set Value="1".
>
> --
> Edwin G. Castro
>
>
> On Wed, Jan 31, 2018 at 9:50 AM, Ven H <venh.123 at gmail.com> wrote:
>
> > Thanks a lot, Edwin. Sorry for being a bit naive here, but can you
> > please provide a code sample?
> >
> > Regards,
> > Venkatesh
> >
> > On Wed, Jan 31, 2018 at 11:15 PM, Edwin Castro <egcastr at gmail.com>
> wrote:
> >
> >> Yes. You just need to be able to reference something in the
> >> Fragment(s) that contain WixUIBannerBmp, WixUIDialogBmp. Perhaps UIRef?
> >>
> >> Sometimes I create Properties that I don't actually use for anything
> >> other than to reference them from another Fragment with PropertyRef.
> >>
> >> I kind of wish there was a way to reference a Fragment directly for
> >> situations where I don't have something I can reference in the
> Fragment...
> >>
> >> --
> >> Edwin G. Castro
> >>
> >>
> >> On Wed, Jan 31, 2018 at 9:32 AM, Ven H via wix-users <
> >> wix-users at lists.wixtoolset.org> wrote:
> >>
> >>> Is it possible to have wix variables like WixUIBannerBmp,
> >>> WixUIDialogBmp in a separate wxs file, rather than Product.wxs? If
> >>> yes, please explain how.
> >>> Since the values of these variables are paths, I cannot have them as
> >>> properties and I don't want to use preprocessor variables. Please help.
> >>>
> >>>
> >>> Regards,
> >>> Venkatesh
>



More information about the wix-users mailing list