Robert,

 

One way that you can accomplish the below is an include file (NOTE
includes are generally frowned upon).

 

As an example you could set a property with respect to a directory
search in the include 

 

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

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

            <Property Id="MYPROPERTY">

                        <DirectorySearch Id="MYDIR"
Path="[ROOTDRIVE]XYZ" Depth="0"/>

            </Property>

</Include>

 

Then use the include where you need it

 

<?include MyProperties.wxi?>

 

There is probably a fragment way to do this that would be more
appropriate.  I'll be interested to see myself.

 

Thanks,

Tom

________________________________

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]

 

 

-------------------------------------------------------------------------
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