Windows Installer Editor Reference
174
Your Installation on the Destination Computer
To test the search, add a text box on one of the dialog boxes in the installation. In the
text box’s Control Text field, enter the property name (surrounded by brackets) that
you assigned to this search. (Example: [MY_PROPERTY].) This causes the value of the
property to be displayed on the dialog box. 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 Registry Value
On the System Search page, you can set up a search for a registry value on the
destination computer. You can either search for a generic value, or do a special search
that’s tailored specifically for a file path or directory path.
To search for a registry value
1. Select Installation Expert > System Search page.
2. Click Add at the right of the page and select Registry.
The Read Registry Value dialog box appears.
3. Complete the dialog box:
Property
Specify a property name. 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 registry
Use this only if the registry information you are searching for is a directory
path. A search of this type returns the entire directory path. Example:
E:\Application\.
If you use this operation on registry information that’s not in the form of a
file path, the search fails.
Read file pathname from registry
Use this only if the registry information you are searching for is a file path,
such as E:\Application\Application.exe. However, the file name itself is
dropped from the search result. A search of this type returns the directory
path only, minus the file name. Example: E:\Application\.
If you use this operation on registry information that’s not in the form of a
directory path, the search fails.
Read raw value from registry
Use this to find any type of registry information.
Root
Select the root folder that contains the registry value to search for.
Key
Enter an entire key path, separating key names with backslashes. Example:
Software\Application\Common.