I have not used HarvestProject (or Heat.exe with a Project), but I use
HarvestDirectory (which I prefer over calling heat.exe in a pre-build
event), after calling a script which moves my project files to the
directory.  In this  link
<http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Automatically-harvest-files-in-VS-2013-td7597592.html#a7597597>
  
I provided some details about using HarvestDirectory.

Also while you are asking about the use of -var with in the context of an
environment variable, I think you are going to need to use a transform in
that situation.  My approach is a little different because I prefer to use
named bindpaths, so in the following link I provided details on using
!bindpath.MyVariable with the -var and using a transform which I posted 
here
<http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Heat-source-path-td7599991.html#a7599995>
 
.

Looking at the heat chm, it only details using -var with either
$(var.mydata) or !(wix.mydata), but as indicated in the above link I use a
transform to change wix.mydata to bindpath.mydata.  You could either use a
bindpath (which is recommended over using preprocessor variables) or you
could change the transform to achieve your goal of using evn.xxx.

In both cases your approach is a little different and because I am tired I
can't think of a more direct answer at this time.  Maybe these posts will be
helpful.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Heat-not-replacing-variable-properly-tp7600673p7600674.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to