Skip to content

$cs.MSI\_GetPropertiesFromMSI

$cs.MSI_GetPropertiesFromMSI(string msifile, Array property)

msifile

MSI file to get properties from

property

Array of properties to retrieve

Terminal window
$MsiProperties=$cs.MSI_GetPropertiesFromMSI('c:\windows\temp\pdfsam.msi',@("ProductVersion","UpgradeCode","ProductCode","ProductName","Manufacturer"))
if ($MsiProperties)
{
[string]$global:Msiproductversion = $MsiProperties["ProductVersion"]
[string]$global:Msiupgradecode = $MsiProperties["UpgradeCode"]
[string]$global:Msiproductcode = $MsiProperties["ProductCode"]
[string]$global:MsiProductName = $MsiProperties["ProductName"]
[string]$global:MsiManufacturer = $MsiProperties["Manufacturer"]
}

returns Hashtable containing properties