::InstallAPI::FindObjects
Search the system for an object based on the given options. See Object Types for the types of objects in a project.
Supported Platforms
All
Returns
A list of matching objects or an empty string.
Options
-active <yes or no>
If specified, only objects which are in the state given will be returned. -active yes means to return only objects which are active, and -active no means to only return objects which are inactive.
-alias <alias name>
The alias of an object to find. If this option is specified, only a single object will be returned since no more than one object can ever have an alias. If no object is found with the given alias, an empty string is returned.
-component <component name>
If specified, only objects that were created from the given component will be included in the result.
-glob <yes or no>
If this option is specified with the -name option, the -name option is matched as a glob pattern instead of an exact name.
-name <name>
If specified, only objects which have the given name will be included in the result. If the -glob option is true, the name will be matched against a pattern instead of an exact match.
-parent <parent ID or alias>
If specified, only objects which are children of the given parent will be included in the result.
|
|
Note that while in a project file, files are children of their parent directory, when files are added to an installer, the structures are flattened so that each file is a child of its file group. |
-type <object type>
If specified, only objects which are of the given type will be included in the result. Valid types are: file, filegroup, component, setuptype, condition, action, actiongroup and pane.
Example
The following example finds all the files in the Program Files group (if it has the Program Files alias).
::InstallAPI::FindObjects -parent "Program Files"
The following example finds all the panes.
::InstallAPI::FindObjects -type pane
The following example finds all the actions in the Install Actions group.
::InstallAPI::FindObjects -type action -parent "Install Actions"
The following example gets the object ID for the Install Actions group.
::InstallAPI::FindObjects -alias "Install Actions"