User Guide
175
Performing a System Search
property to be displayed on the dialog. When you run the installation, the property you
specified will hold the results of the search. If it is empty, the search failed.
Searching For a Previously-Installed Component
On the System Search page, you can set up a search for a component that was
previously installed on the destination computer. The search looks for the component’s
GUID in the registry to determine whether the component is installed.
You might use this search to find the installation directory of a component installed by a
different Windows Installer installation.
Example: Suppose you want to find the installation directory of version 1.0 of your
Sample1 application. You could use a file search to find the file, Sample1.exe, but it
might take a long time to search all drives. Instead, you could search for the component
ID of the component that contained Sample1.exe in the original installation. This type of
search is much faster.
In order to perform a component search, you must know the component’s ID. To obtain
this ID, you must have access to the .WSI file of the previous installation. You can find
the component’s GUID on the Component Details dialog; see Adding and Editing a
Component on page 391.
To add a component to your search list:
1. Select Installation Expert > System Search page.
2. Click Add at the right of the page and select Component.
The Read Component Settings dialog appears.
3. Complete the dialog:
• Property
Specify a property. It will hold the result of the search, which is a file name,
directory path, or other value, depending on the operation performed by the
search. If you’ve already defined a new public property (all uppercase) in the
Properties icon on the Product tab, then you can select it from the list; otherwise
enter a new property name (all uppercase). If you enter a new property name,
and the search fails to find a match, the property value will be null and will be
false if used in a condition.
Operation
Select the type of entry for the property:
# Read directory name from component keypath
Select this operation if the component you are searching for contains only an
empty directory (a Create Directory item) and has an empty key path. This
operation returns a directory path. (Example: C:\Program
Files\Application\.) If the keypath for this component is a file, ODBC item, or
registry item, this operation fails.
# Read file pathname from component keypath
Select this operation only if the component you are searching for has a file
for a key path. In this case, it returns the directory path. Example:
C:\Program Files\Application\.
• Component ID
Enter the GUID for the component. See Adding and Editing a Component on
page 391 and About GUIDs on page 540.
4. Click OK.