File Exists 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 Exists condition.

The File Exists setting shows the condition that is configured for checking target systems for the presence of a particular file. To define this type of condition, configure the subsettings under the File Exists setting as needed.

The following subsettings are available for this condition.

File Exists Condition Settings

Setting

Description

Path

To create a conditional statement that checks for the presence of 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]

See Also