Share via


Adding a File Launch Condition

Predefined file launch conditions allow you to add both a file search and a launch condition in a single step based on the search. For example, you might search a target computer for a specific file, and then use the launch condition to evaluate the result of the search. If the search is not successful, the launch condition will display an error message dialog box and the installation will be terminated.

To add a file launch condition

  1. In the Launch Conditions Editor, select the Requirements on Target Machine node.

  2. On the Action menu, choose Add File Launch Condition.

  3. Select the Search for File node. In the Properties window, select the FileName property and type the name of the file to search for.

  4. Select the Folder property and type the name of the folder where the search will start. This can be either the bracketed name for a Windows Installer special folder (for example, [ProgramFilesFolder]) or the full path to any folder (for example, C:\Program Files\MyProgram).

  5. Optionally, set the additional properties to specify the depth (levels of folders to search), date, size, and version.

    Note   The Property property value matches the Condition property value in the launch condition. If you change the Property property, you must also change the Condition property to match.

  6. Select the Condition node. In the Properties window, select the Message property and type the error message that will be displayed if the file is not found.

See Also

Launch Condition Management in Deployment | Properties for the Launch Conditions Editor | Using Windows Installer Properties