Re: [WiX-users] MsiGetProductInfoFromScript returns 1603

2010-07-23 Thread Jacques Eloff
Thanks Rob I tested this quickly with the code snippet below and it works great: Type t = Type.GetTypeFromProgID(WindowsInstaller.Installer); Installer i = (Installer)Activator.CreateInstance(t); Database d = i.OpenDatabase(@C:\Test\Test.msi, MsiOpenDatabaseMode.msiOpenDatabaseModeReadOnly);

[WiX-users] MsiGetProductInfoFromScript returns 1603

2010-07-22 Thread Jacques Eloff
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

Re: [WiX-users] MsiGetProductInfoFromScript returns 1603

2010-07-22 Thread Rob Mensching
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