In the code which was just posted you have three places where you are calling
BalLog and using a formatted string specifier %ls but the argument is
installState which is not a string.  These three lines throw the exception. 
Change the format specifier to %d.  Then the code runs to the end and gets
the path.

The resulting log is not very informative
[159C:153C][2014-04-23T10:52:09]i000: First call to MsiLocateComponentW, the
install state of x86 Word PIA: 3

You may want to make a subroutine which takes installState and converts it
to a string and then calls the BaLog message with the %ls formatter.

It is very easy to copy this code into a BAFunctions.dll and run it under a
debugger, without doing any special build of the wix 3.8 toolset..  There is
a sample at src\burn\samples\BAFunctions.  I compile a Release build but set
the project properties to disable optimization and include debug symbols. 
Then compile the bundle which includes the BAFunctions.dll, and then
right-click the BAFunctions project and tell it to start a debug session.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Trying-to-use-MsiLocatecomponent-in-Bootstrapper-to-check-for-a-Word-PIA-tp7594186p7594287.html
Sent from the wix-devs mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to