Robert,

 

One thing I'm not sure about... Are you saying that you want to be able
to change the property at runtime? If so, then I think what you are
suggesting may actually break the component rules (you would have the
same component, but multiple different filenames). I'm sure someone else
here can tell me if I'm right about that one!

 

If what you are actually looking for is the ability to use the same
source file(s) to create different packages, then using $(var.whatever)
is probably a better choice. You can either define the settings for that
type of variable in an include file, or (possibly more appropriately)
with the -D command line parameter.

 

A quick sample for how something like that may be used would be as
follows:

 

<?define Manufacturer=Some Company?>

<?define Name=Product Name?>

<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi";>

            <Product Id="????????-????-????-????-????????????"
Language="1033" Manufacturer="$(var.Manufacturer)" Name="$(var.Name)"
...

 

NOTE: I'm not 100% confident about the <?define ... ?> syntax for string
parameters. You may need to put quote marks around the actual string...
We pass ours in from the command line, using a parameter of the form:

 

"-dManufacturer=Some Company"

 

Hope this helps,

Regards,

Richard

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Yexley,
Robert (LNG-CON)
Sent: Monday, March 12, 2007 2:24 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Reusable properties?

 

Hey everyone,

 

Just getting my feet wet with WiX. I've been working my way through the
documentation and the online tutorial the past few days, but so far I've
not been able to figure out if WiX has the ability to create anything
like a global, reusable property, and if so, how are they applied? For
example, what I would like to do, is create a property whose value can
be referenced from various other places within the installer source file
(.wxs). So, something like the following...

 

<!-- Declare the property -->

<Property Id="MyApplicationName" Value="My Cool Application" />

 

<!-- Now reference/use that property -->

<Directory Id="TARGETDIR" Name="TDir" LongName="TargetDirectory">

    <Directory Id="ProgramFilesFolder" Name="PFiles" LongName="Program
Files">

        <Directory Id="INSTALLDIR" Name="MyAppDir"
LongName="{I.Want.To.Insert.My.Property.Value.Here...How.Do.I.Do.That?}"
>

        </Directory

    </Directory>

</Directory>

 

______________________________________

// YEX //

 

// Bob Yexley

// Contractor / Software Engineer [Extreme Consulting]

// LexisNexis - Risk & Information Analytics Group (RIAG)

// 937.865.6800 ext. 58655

// [EMAIL PROTECTED]

 

 




* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or 
entity to whom it is addressed. If you have received this communication in 
error, be aware that forwarding it, copying it, or in any way disclosing its 
content to any other person, is strictly prohibited. Peek Traffic Corporation 
is neither liable for the contents, nor for the proper, complete and timely 
transmission of (the information contained in) this communication. If you have 
received this communication in error, please notify the author by replying to 
this e-mail immediately and delete the material from any computer.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to