# MSI_SearchForPackageInfoByName

> Returns an array of dictionaries that contain information about installed msi packages that match the search filter.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/msi-functions/msi-searchforpackageinfobyname/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Returns an array of dictionaries that contain information about installed msi packages that match the search filter

### Syntax

MSI_SearchForPackageInfoByName(sSearchFor) As Boolean

### Parameters

#### sSearchFor (String)

Text that will be searched for. If part of sSearchFor is found then information for that package is collected

### Return value

Result will be stored in gaValue. Each item in the array will be of type Dictonary. Property collected is used as the name of the key.

Collected properties are: ProductCode, ProductName, InstallLocation and VersionString

### Example

**VBScript**

```vb
If bStatus Then bStatus = MSI_SearchForPackageInfoByName("CapaInstaller")
If bStatus Then
  For Each dProduct In gaValue
    For Each sKey in dProduct.Keys 
      bStatus = Job_WriteLog("Custom", "Key: '" & sKey & "' value: '" & dProduct.Item(sKey) & "'", bStatus, True)
    Next
  Next
End If
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
