$sMSI = FileOpenDialog("MSI Properties", @ScriptDir, "Windows Installer Files (*.msi)")
$oInstaller = ObjCreate("WindowsInstaller.Installer")
$oDB = $oInstaller.OpenDataBase($sMSI, 0)
$oView = $oDB.OpenView("SELECT Property,Value FROM Property")
$oView.Execute()
$oCount = 0
While @error = 0
$oRecords = $oView.Fetch
If Not (IsObj($oRecords)) Then ExitLoop ;<======
$oPropValue = $oRecords.StringData(2)
$oPropName = $oRecords.StringData(1)
If $oPropName <> "" Then
$oCount += 1
ConsoleWrite($oPropName & " = " & $oPropValue & @CRLF)
EndIf
WEnd