public static string[] GetFilesFromMSI(string msiPath) { List <string> properties = new List <string>(); using (WindowsInstaller.Session session = WindowsInstaller.Installer.OpenPackage(msiPath, true)) { properties.Add(session.GetProductProperty("ProductVersion")); properties.Add(session.GetProductProperty("ProductCode")); properties.Add(session.GetProductProperty("UpgradeCode")); } return(properties.ToArray()); }