I believe it would be something like:

Session.Property("TOMCATHOME")

-----Original Message-----
From: cge [mailto:ell...@avaya.com] 
Sent: Thursday, June 10, 2010 2:24 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Evaluate property


I have a registry entry that contains a directory: 

    <Property Id="TOMCATHOME">
      <RegistrySearch Id="TomcatHome" Type="raw" Root="HKLM"
Key="SOFTWARE\...\Tomcat" Name="TomcatHome"/>
    </Property>

Then I have a JScript custom action that has to parse an XML file inside
this directory:

    var filepath = "[TOMCATHOME]/conf/serverConfig.xml";
    xmlDoc.load(filepath);

But the xmlDoc.load doesn't find the file, because the registry entry
contains backslashes. Hard-coding the path with all forward slashes works.
Hard-coding the path with all double backslashes works.  

Given that I have no control over the directory entry, it would seem my only
option is to do a search and replace on the resolved value of [TOMCATHOME].
But how can I get that resolved value?

    var th = "[TOMCATHOME]";
    var v = th.valueOf();  //  'v' still contains "[TOMCATHOME]", even
though
    alert(v);     // displays the actual directory path. As does
    alert(th);    // for that matter.
    




-- 
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Evaluate-prope
rty-tp5165399p5165399.html
Sent from the wix-users mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to