How about: SELECT `Value` FROM `Property` WHERE "Property"="ProductCode"

I don't think you want ::MsiGetProductInfoFromScript().

On Thu, Jul 22, 2010 at 4:42 PM, Jacques Eloff <repst...@gmail.com> wrote:

> Hi
>
> I'm trying to extract the Product code from an MSI using C# (this is for a
> custom msbuild task I'm writing).
>
> I'm using the following definition for P/Invoke
>
>
> [DllImport("msi.dll", CharSet = CharSet.Unicode)]
>
> static extern Int32 MsiGetProductInfoFromScript(string scriptFile,
> StringBuilder product, ref ushort langId, ref uint version,
> StringBuildername,
> ref uint nameSize, StringBuilder package, ref uint packageSize);
> I keep getting a return code of 1603. Everything looks OK, but I'm starting
> to suspect that the script file I'm passing is causing a problem,
>
> ushort langId = 0;
>
> uint version = 0;
>
> uint packageSize = 10;
>
> uint nameSize = 40;
>
> StringBuilder product = new StringBuilder(40);
>
> StringBuilder package = new StringBuilder(40);
>
> StringBuilder name = new StringBuilder(100);
>
> int e = MsiGetProductInfoFromScript(@"C:\Test\Test.msi", product,
> reflangId,
> ref version, name, ref nameSize, package, ref packageSize);
>
> Am I even calling the correct method? The only other option I can think of
> is to open the DB and go through the whole SELECT * FROM Property and then
> extract the product code from the returned view.
>
> Thanks,
> Jacques
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


-- 
virtually, Rob Mensching - http://RobMensching.com LLC
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to