For WiX v3, the syntax is: <?define MY_INSTALL_LOC = 'InstallLocation'?>
<RegistryValue Name='$(var.MY_INSTALL_LOC)' Type='string' Value='[SOME_PROPERTY]' /> Still regular (), not curly braces. Julie Campbell [EMAIL PROTECTED] -----Original Message----- -------------------------------------------------------------------- Message: 1 Date: Mon, 20 Aug 2007 13:25:00 -0700 From: "Dix, John" <[EMAIL PROTECTED]> Subject: [WiX-users] Variables used in WiX files. To: <wix-users@lists.sourceforge.net> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" Hello, I am new to WiX and I have done searches for how to use environment variables in the WiX files but the examples given do not seem to be working for me. Below is my WXS file I am working with. I am using the <?define ... ?> directive (?) to set a relative path variable to my executable. Candle compiles but Light does not link. Here is the output. Can anyone please tell me what I am doing incorrect here? THANKS! C:\enlistments\Main\Build\Setup>candle ems.wxs Microsoft (R) Windows Installer Xml Compiler version 3.0.2925.0 Copyright (C) Microsoft Corporation 2003. All rights reserved. EMS.wxs C:\enlistments\Main\Build\Setup>light -sice:ICE43 -sice:ICE57 -sice:ICE64 ems.wi xobj Microsoft (R) Windows Installer Xml Linker version 3.0.2925.0 Copyright (C) Microsoft Corporation 2003. All rights reserved. C:\enlistments\Main\Build\Setup\EMS.wxs(46) : error LGHT0103 : The system cannot find the file '${WiX.Global.SupportFilePath}'. C:\enlistments\Main\Build\Setup\EMS.wxs(26) : error LGHT0103 : The system cannot find the file '${WiX.Global.SupportFilePath}'. <?xml version="1.0"?> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> <Product Name='eMedSample and eSignature' Id='8C8EE958-63F6-44e0-B8D6-77CA69E63AFA' UpgradeCode='C45433AF-997A-4b5e-8905-812CE608D924' Language='1033' Version='3.20.0.1' Manufacturer='MedManage Systems'> <Package Keywords='Installer' Description='MedManage Systems eMedSample and eSignature application' Comments='This is the basic application for hosting all of our customers' InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252' /> <Condition Message="You need to be an administrator to install this product."> Privileged </Condition> <Condition Message='Windows Server 2003'> VersionNT = 502 </Condition> <?define WiX.Global.SupportFilePath='..\..\tools\MD5Summer\md5summer.exe' ?> <Media Id='1' Cabinet='mms.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" /> <Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation [1]" /> <Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='MAINTENANCE_DIR' Name='Maintenance'> <Directory Id='INSTALLDIR' Name='MD5'> <Component Id='MD5SUMMER_APP' Guid='8AAE78E9-A405-49f2-896F-0CCF764F925F'> <File Id='MD5SUMMER_EXE' Name='MD5Summer.exe' DiskId='1' Source="${WiX.Global.SupportFilePath}" Vital='yes'> <Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Name="MD5Summer" WorkingDirectory='INSTALLDIR' Icon="MD5SUMMER_ICON" IconIndex="0" /> </File> <RemoveFolder Id='ProgramMenuDir' On='uninstall' /> </Component> </Directory> </Directory> <Directory Id="ProgramMenuFolder" Name="Programs"> <Directory Id="ProgramMenuDir" Name='MD5' /> </Directory> <Directory Id="DesktopFolder" Name="Desktop" /> </Directory> <Feature Id='Complete' Level='1'> <ComponentRef Id='MD5SUMMER_APP' /> </Feature> <Icon Id="MD5SUMMER_ICON" SourceFile="${WiX.Global.SupportFilePath}" /> </Product> </Wix> -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Mon, 20 Aug 2007 16:34:03 -0400 From: <[EMAIL PROTECTED]> Subject: Re: [WiX-users] Variables used in WiX files. To: <[EMAIL PROTECTED]>, <wix-users@lists.sourceforge.net> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" John, At first glance, I suspect you're using the wrong type of parenthesis. If it's WiX 2.x you need ( and ), not { and }. I don't remember it having been changed for WiX 3, but it may have. Regards, Richard _____________________________________________________________________________ Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com _____________________________________________________________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users