public static uint MsiGetProductProperty(MsiHandle hProduct, string szProperty, out string value) { StringBuilder sb = new StringBuilder(1024); int length = sb.Capacity; uint err; value = null; if (0 == (err = MsiGetProductPropertyW(hProduct, szProperty, sb, ref length))) { sb.Length = length; value = sb.ToString(); return(0); } return(err); }
static extern uint MsiGetProductPropertyW(MsiHandle hProduct, string szProperty, StringBuilder value, ref int length);
public extern static uint MsiOpenPackageW(string szPackagePath, out MsiHandle product);