Special Considerations for Searching the Registry at Run Time

InstallShield 2016

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module
MSI Database
MSM Database
Transform

The System Search Wizard and the System Search view enable you to configure the following types of registry-related system searches:

File path, as specified by a registry entry
Folder path, as specified by a registry entry
Registry entry

Note the following details about these types of system searches.

Searching for the Presence of a Registry Key

Windows Installer does not have built-in support for searching target systems for the presence or absence of a specific registry key. However, you can create a system search that looks for the default value of a specific registry key. If the default value is present, Windows Installer writes it to the system search’s associated property. If the system search fails to find the default value, Windows Installer leaves the property undefined.

Storing Registry Entry Types in a System Search’s Property

At run time, Windows Installer sets the value of the property that you specified for your registry-related system search to the location that is found on the target system. In addition, Windows Installer adds a prefix to the property value to indicate the type of registry entry (such as REG_DWORD or REG_BINARY). If you then use the property to configure the registry, or if you create a condition that reads this property, you must understand the syntax that Windows Installer uses to set the property.

The following table lists each of the types of registry entries, along with the associated prefix that Windows Installer uses when setting the system search property.

Prefixes or Other Notation that Windows Installer Uses for a System Search Property’s Value

Prefix/Notation

Meaning

<No prefix>

The property value contains a string value (REG_SZ).

#
#+
#-

The property value contains an integer value (REG_DWORD).

#x

The property value contains a hexadecimal value (REG_BINARY).

Windows Installer converts each hexadecimal digit as an ASCII character for this property value.

#%

The property value contains an expandable string value (REG_EXPAND_SZ).

<null>

The property value contains a list of strings (REG_MULTI_SZ). This value starts and ends with null.

See Also