Preprocessor variables are case-sensitive. Does using $(var.PLATFORM) fix it
?

-----Original Message-----
From: StevenOgilvie [mailto:sogil...@msn.com] 
Sent: 13 September 2012 00:05
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] define element for ProgramFilesFolder not working in
include file :(

Hi
I have an include file: <?include ..\..\Setup\Includes\Variables.wxi ?> and
it has the following: 
<?if $(var.Platform) = x64 ?>
  <?define PlatformProductName = "$(var.ProductName) (64 bit)" ?>
  <?define Win64 = "yes" ?>
  <?define DotNetFramework40Folder
="[%SystemRoot]\Microsoft.NET\Framework64\v4.0.30319\" ?>
  <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
  <?else ?>
  <?define PlatformProductName = "$(var.ProductName)" ?>
  <?define Win64 = "no" ?>
  <?define DotNetFramework40Folder
="[%SystemRoot]\Microsoft.NET\Framework\v4.0.30319\" ?>
  <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
  <?endif ?> 

I use it in a merge module like this: (I include the include file) BTW I need
the " around the exe pathname or the custom action fails... 
<CustomAction Id="SetEALNBService" Property="EALNBService" 
Value="&quot;$(var.PlatformProgramFilesFolder)\MYCOMPANY\MYPRODUCTNAME\Servic
es\EnterpriseAuditLogService\NServiceBus.Host.exe&quot;
/installInfrastructure" Execute="immediate" /> <CustomAction
Id="EALNBService" Impersonate="no" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="deferred" Return="ignore" />

it doesn't work, the logfile has this entry: 
MSI (s) (70:EC) [18:50:54:003]: PROPERTY CHANGE: Adding
EALNBService.CA23A0DC_B2DE_4F2C_9E74_FD373F99E9D7 property. Its value is
'"ProgramFilesFolder\MYCOMPANY\MYPRODUCTNAME\Services\EnterpriseAuditLogServi
ce\NServiceBus.Host.exe"
/installInfrastructure'. 

and obviously it doesn't work... (if I hard code the path in the custom
action (i.e. C:\Program Files (x86)) it works... 

What am I doing wrong? 

thanks, 

Steve 



--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/define-element-
for-ProgramFilesFolder-not-working-in-include-file-tp7580463.html
Sent from the wix-users mailing list archive at Nabble.com.

-----------------------------------------------------------------------------
-
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to