When developing a custom action, it's usually a good idea to try the important logic in something easier to debug first, like a console app. Trying to debug both the custom action stuff AND the application-specific logic at the same time can be daunting otherwise, not to mention time-consuming.
If you can get away with writing your custom action in C# that might make things a bit easier too. In our case, our products have a minimum platform requirement of Windows 7, so we know that .NET 3.5 will be present when the installer is run. Davis, Jeff wrote > I never saw a single response to this? > > jeff > > -----Original Message----- > From: Davis, Jeff [mailto: > jdavis@ > ] > Sent: Tuesday, March 10, 2015 12:58 PM > To: > wix-users@.sourceforge > Subject: [WiX-users] Xpath Expression > > I am trying to get this Custom Action project working with my Xpath > Expression > > http://www.codeproject.com/Articles/865604/Writing-a-Wix-Extension-to-Read-XML-Files > > The project compiles and seems to be working. > > <xmlsearch:XmlSearch Id="SerialNo" > File="$(var.ProjectDir)Myxmlfile.xml" > XPath="substring-after(substring-before(/MainNode/SubNode[\[]1[\]]/SubSubNode/LowestNode[\[]1[\]]/@KeyValue,&quot;.xml&quot;),&quot;.bp&quot<mailto:/@KeyValue,&quot;.xml&quot;),&quot;.bp&quot>;)" > /> > > The string I am parsing looks something like this "12345.bp09090909.xml" > I want to be able to extract the 09090909 portion out and assign it to a > Property. > > If I don't use the substring-after and before functions (or any functions > for that matter) it works fine. But with the functions in the XPath I get > an Unknown Xml Error and it returns a "0". > > I am not an experienced C++ developer or that knowledgeable at writing > custom actions for Wix Installs. So my ability to debug this is limited. > > Has anyone else run into problems using this project and/or dealing with > XPath expressions that use nested or single functions? > > > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > WiX-users mailing list > WiX-users@.sourceforge > https://lists.sourceforge.net/lists/listinfo/wix-users > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > WiX-users mailing list > WiX-users@.sourceforge > https://lists.sourceforge.net/lists/listinfo/wix-users -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Xpath-Expression-tp7599517p7599596.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users