ISearch
Declaration
ISearch: IDispatch
Overview
This interface is meant to manage existing searches or add new
ones.Any search operation is performed on the target machine only if the
specified property is not set (other searches didn't set that property).
In case of success, the property will be set.
Properties
Array<String> PredefinedSearchIds - Gets the collection of the predefined search ids.
Array<IDispatch> Searches - Gets the collection of the existing searches.
Methods
NewAppSearch(String aResultPropertyName) - returns
IAppSearch
Creates a new application search.
NewFileSearch(String aResultPropertyName) - returns
IFileSearch
Creates a new file search.
NewXmlSearch(String aXmlFile) - returns
IXmlSearch
Creates a new XML search.
NewRegistryKeyExistsCheck(String
aResultPropertyName) - returns IRegKeyExistsSearch
Creates a new registry key search that will check if a specific
registry key exists.
NewRegistryValueExistsCheck(String
aResultPropertyName) - returns IRegKeyExistsSearch
Creates a new registry value search that will check if a specific
registry value exists.
NewRegistryKeySubkeysContainsVersionCheck(String
aResultPropertyName) - returns IRegKeyVersionSearch
Creates a new registry search that will check if subkeys contain a
specific version.
NewRegistryKeyValuesContainsVersionCheck(String
aResultPropertyName) - returns IRegKeyVersionSearch
Creates a new registry search that will check if sub-values
contain a specific version.
NewRegistryValueContainsVersionCheck(String
aResultPropertyName) - returns IRegKeyVersionSearch
Creates a new registry search that will check if a registry value
contains a specific version.
NewRegistryValueCompare(String aResultPropertyName)
- returns IRegValSearch
Creates a new registry search that will
check if a registry value contains a specific value by using a predefined
comparison method.
NewComponentInstalledCheck(String
aResultPropertyName) - returns IComponentSearch
Creates a
new search that will check if a component specified by its GUID is
installed.
NewProductVersionCheck(String aResultPropertyName) -
returns IProductVersionSearch
Creates a new search that will check
if a product specified by its product code or upgrade code is
installed.
NewPredefinedSearch(String aPredefinedSearch) -
returns IFileSearch
Creates a new file search for well-known
products by specifying the predefined search id.
DeleteSearch(IDispatch aSearch)
Removes a
search from the search collection and destroys it
Example
Remove a search operation from an existing project and add new file search:
$advinst = new-onject -com AdvancedInstaller $prj = $advinst.LoadProject("D:\Your Application.aip") #find search object by its property $myAppSearch = $prj.Search.Searches | where-object {$_.PropertyName -eq "MY_APP_SEARCH_PROP"} | Select -First 1 $prj.Search.DeleteSearch($myAppSearch) $newFileSearch = $prj.Search.NewFileSearch("MY_FILE_SEARCH_PROP") $newFileSearch.FileName = "MyApp.exe" $newFileSearch.MinVersion = "2.0"
Topics
- IBaseSearch
Interface for basic search information. - IComponentSearch
Interface for component search. - IFileSearch
Interface for file search. - IFileVersionSearch
Interface for search file version. - ILocationSearch
Interface for application search. - IProductVersionSearch
Interface for installed product search. - IRegEntryExistsSearch
Interface for registry key search. - IRegEntryVersionSearch
Interface for registry key version search. - IRegValSearch
Interface for registry value search. - ISearchComponentLocator
Interface for search component locator. - ISearchFolderLocator
Interface for search folder locator. - ISearchIniLocator
Interface for search “ini” locator. - ISearchRegistryLocator
Interface for search registry locator. - IXmlElementSearch
Interface for XML element search. - IXmlSearch
Interface for XML search. - IXmlElementSearchLocator
Interface for the XML element search locator.