msigetproperty (msi)
Last changed: -131.107.0.103

.
Summary
Gets the value for an installer property.

C# Signature:

[DllImport("msi.dll", CharSet=CharSet.Unicode)]
static extern int MsiGetProperty(int hInstall, string szName,
   [Out] StringBuilder szValueBuf, ref int pchValueBuf);

Notes:

MSIHANDLEs are unsigned longs regardless of platform; it maps to 32-bit ints.

Tips & Tricks:

Please add some!

Sample Code:

int handle;

MsiOpenPackage(fileName, out handle);

StringBuilder sb = new StringBuilder();

int stringSize = 256;

int value = MsiGetProperty(handle, "ProductVersion", out sb, ref stringSize);

Alternative Managed API:

MSI interop library

http://sourceforge.net/project/showfiles.php?group_id=40188&package_id=110212

Documentation