internal static MsiPropertyInfo[] GetPropertiesFromDatabase(Database msidb)
        {
            List <MsiPropertyInfo> properties = new List <MsiPropertyInfo>();

            using (SummaryInformation summaryInfo = new SummaryInformation(msidb))
            {
                foreach (MsiPropertyInfo prototype in DefaultMsiPropertySet)
                {
                    bool   failed    = false;
                    object propValue = null;
                    try
                    {
                        // Wix has a bug when translating a FILETIME, so we do it manually
                        if (prototype.PropertyType == VT.FILETIME)
                        {
                            propValue = summaryInfo.GetPropertyFileTime(prototype.ID);
                        }
                        else
                        {
                            propValue = summaryInfo.GetProperty(prototype.ID);
                        }
                    }
                    catch
                    {
                        failed = true;
                    }
                    if (!failed)
                    {
                        properties.Add(new MsiPropertyInfo(prototype, propValue));
                    }
                }
            }
            return(properties.ToArray());
        }