File Comparison Condition Settings

InstallShield 2015

Project: This information applies to the following project types:

Advanced UI
Suite/Advanced UI

Edition: The Advanced UI project type is available in the Professional edition of InstallShield. The Suite/Advanced UI project type is available in the Premier edition of InstallShield. For information about the differences between these two project types, see Advanced UI Projects vs. Suite/Advanced UI Projects.

When you are building a conditional statement for an exit, detection, eligibility, or feature condition in an Advanced UI or Suite/Advanced UI project, or for an action condition in a Suite/Advanced UI project, you can create a File Comparison condition.

The File Comparison setting shows the condition that is configured for checking target systems for specific information—date, version number, or content—for a particular file. To define this type of condition, configure the subsettings under the File Comparison setting as needed.

The following subsettings are available for this condition.

File Comparison Condition Settings

Setting

Description

Path

To create a conditional statement that checks for specific information for a particular file, do one of the following:

Enter the path and name for the file. To include a predefined folder in the path, select the appropriate property in the list. If you select one of the 64-bit folder locations, the installation checks the 64-bit folder location on 64-bit target systems and the 32-bit folder location on 32-bit target systems.
Enter only the file name in this Path setting; use the Search Path setting to specify one or more paths that you want the installation to check at run time.

When you type a value for this setting, you can include one or more formatted expressions that contain property names, environment variable references, and other special strings; at run time, the installation expands the values of these expressions. To learn about the syntax that is available for these expressions, see Using Formatted Expressions that Advanced UI and Suite/Advanced UI Installations Resolve at Run Time.

Search Path

If you specified a path and file name in the Path setting, leave the Search Path setting blank.

If you specified only a file name in the Path setting, use the Search Path setting to specify a list of the paths for the locations on target systems in which you want to check for that file. Separate multiple paths with a semicolon (;). To include a predefined folder in the path, use the appropriate property. The following sample value for the Search Path setting uses directory properties to search two different paths:

[CommonFilesFolder]Microsoft Shared\Office15;[CommonFilesFolder]Microsoft Shared\Office14

It is strongly recommended that you try to narrow the search path as much as possible. In general, the more broad you make your search path, the longer it will take for the installation to check the target system.

Note that if any path that you enter in this setting includes the property [System64Folder], the installation disables file system redirection on 64-bit target systems when checking the system folder for any of the specified paths. If you do not enter [System64Folder] in this setting for any paths, the installation leaves file system redirection enabled.

Thus, if you enter a value of [System64Folder];[SystemFolder] in this setting, the installation checks C:\Windows\System32 on both 32-bit and 64-bit target systems. If you enter a value of [SystemFolder], the installation checks C:\Windows\System32 on 32-bit target systems and C:\Windows\SysWOW64 on 64-bit target systems.

When you type a value for this setting, you can include one or more formatted expressions that contain property names, environment variable references, and other special strings; at run time, the installation expands the values of these expressions. To learn about the syntax that is available for these expressions, see Using Formatted Expressions that Advanced UI and Suite/Advanced UI Installations Resolve at Run Time.

For example, to search for the file that is specified in the Path setting in all directories that are defined for the PATH environment variable on a target system, enter the following value in the Search Path setting:

[%PATH]

Conversion

Select the type of data that you want to compare. Available options are:

Content—The data that you want to compare is a string.
Version—The data that you want to compare is a file version in the format nn.nn.nn.nn.
Local Date and Time—The data that you want to compare is the local date and time on the target system that is running the Advanced UI or Suite/Advanced UI installation—for example, 4/26/2004 3:57:46 PM.

Comparison

Select the option that describes how you want to compare the value on the target system with the value that you specify in the Compare To setting. For example, consider a file version condition in which the value of the Comparison setting is Less Than or Equal To, and the value of the Compare To setting is 4.1. At run time, this condition evaluates as true if the file version on the target system is 4.0 or 4.1; it evaluates as false if the file version on the target system is 4.2.

Compare To

Specify the value that you want to compare with the value on the target system. The value that you enter depends on the option that is selected for the Conversion setting:

If Content is selected in the Conversion setting, enter the file string that you want to compare in the Compare To setting.
If Version is selected in the Conversion setting, enter the file version in the format nn.nn.nn.nn.
If Local Date and Time is selected in the Conversion setting, enter the date and time that is used locally on target systems that are running the Advanced UI or Suite/Advanced UI installation—for example, 4/26/2004 3:57:46 PM.

When you type a value for this setting, you can include one or more formatted expressions that contain property names, environment variable references, and other special strings; at run time, the installation expands the values of these expressions. To learn about the syntax that is available for these expressions, see Using Formatted Expressions that Advanced UI and Suite/Advanced UI Installations Resolve at Run Time.

The Comparison setting is where you indicate how you want to compare the value on the target system with the value that you specify in the Compare To setting. For example, consider a file version condition in which the value of the Comparison setting is Less Than or Equal To, and the value of the Compare To setting is 4.1. At run time, this condition evaluates as true if the file version on the target system is 4.0 or 4.1; it evaluates as false if the file version on the target system is 4.2.

See Also