Beispiel #1
0
        public static string GetProperty(string msiPath, string property)
        {
            string propertyValue = null;

            if (!String.IsNullOrEmpty(msiPath))
            {
                msiPath = System.Environment.ExpandEnvironmentVariables(msiPath);
                Database db = new Database(msiPath);
                propertyValue = MsiUtils.GetProperty(db, property);
                db.Close();  // be sure to close the db or future attempts to open it will fail (i.e. to install/uninstall it)
            }
            return(propertyValue);
        }