I'm fairly new to WiX and am trying to do use merge modules for the first time (I'm fluent in InstallShield, but want to move away from it).
Anyway, I'm trying to have my merge module create a couple of environment variables at install time, both of which will have [INSTALLDIR] as part of its value. I figured I ought to use the [TARGETDIR] property of the merge module. However, when I do that, all I get is "C:\" when the real install location is that plus some directories (i.e., "C:\Program Files\MyCompany\MyApp"). The following is my Install code and my Merge Module code. My assumption is that I'm doing something wrong. How can I get the full path. BTW: I also tried referencing [INSTALLDIR], [INSTALLLOCATION], and others but to no avail. Those didn't give me any value whatsoever. Install Code: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="COMPANYLOCATION" Name="MyCompany"> <Directory Id="PRODUCTLOCATION" Name="MyProduct"> <Directory Id="INSTALLLOCATION" Name='2.0.0'> <Merge Id='CoreFilesMM' Language="1033" SourceFile='..\Spectrum11MergeModule\bin\Debug\Spectrum11MergeModule.msm ' DiskId='1' /> </Directory> </Directory> </Directory> </Directory> </Directory> Merge Module Code: <Directory Id="TARGETDIR" Name="SourceDir"> <Component Id="EnvironmentVars" Guid="F50F41C2-7777-4680-8B50-741F96C8D8D6"> <Environment Id="envHome" Action="create" Name="SPECTRUM_HOME" System="yes" Value="[TARGETDIR]"/> <Environment Id="envLogDir" Action="create" Name="SPECTRUM_LOGDIR" System="yes" Value="[TARGETDIR]\logs"/> </Component> <?include Config.wxi ?> <?include Libraries.wxi ?> <?include Converter.wxi ?> <?include Templates.wxi ?> </Directory> --- Bradford Younie Senior Software Engineer Chase Paymentech Solutions 4 NE Blvd Salem, NH 03079-1952 Fax: 603-896-813 bradford.you...@chasepaymentech.com ---------- 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