In a merge module, I'm trying to create an environment variable that
contains the path to where the product is being installed to. My merge
module uses the code below to do it, but it's not working quite right.
When the product gets installed to "c:\program files\mycompany\myapp",
[TARGETDIR] in the merge module only puts "C:\" into the environment
variable even though the product does install to the full path. Is there
a different way to handle this?
 
<?xml version="1.0" encoding="UTF-8"?>

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

    <Module Id="Spectrum11MergeModule" Language="1033"
Version="1.0.0.0">

        <Package Id="9b6a3ca6-caf9-49b2-8fb9-e8c1c1b354f2"
Manufacturer="Spectrum11MergeModule" InstallerVersion="200" />

        <Directory Id="TARGETDIR" Name="SourceDir">

            <Component Id="EnvironmentVars"
Guid="F50F41C2-7777-4680-8B50-741F96C8D8D6">

                <Environment Id="envHome" Action="create"
Name="SPECTRUM_HOME1" System="yes" Value="[TARGETDIR]"/>

                <Environment Id="envLogDir" Action="create"
Name="SPECTRUM_LOGDIR1" System="yes" Value="[TARGETDIR]\logs"/>        

            </Component>

        </Directory>

    </Module>

</Wix>

--

Brad Younie

----------
Learn more about Chase Paymentech Solutions,LLC payment processing services at 
www.chasepaymentech.com.

THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are 
proprietary and confidential information intended only for the use of the 
recipient(s) named above.  If you are not the intended recipient, you may not 
print, distribute, or copy this message or any attachments.  If you have 
received this communication in error, please notify the sender by return e-mail 
and delete this message and any attachments from your computer.



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to