How to: Add a Windows Installer Launch Condition

Predefined Windows Installer conditions allow you to add both a Windows Installer search and a launch condition in a single step based on the search. For example, you might search a target computer to determine if a specific package is installed, 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.


The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To add a Windows Installer launch condition

  1. In the Launch Conditions Editor, select the Requirements on Target Machine node. For more information, see Launch Conditions Editor.

  2. On the Action menu, choose Add Windows Installer Launch Condition.

  3. Select the Search for Component node. In the Properties window, select the ComponentId property and type the Component ID to search for.


    The Component ID is a GUID assigned by a package during installation; it does not match any of the deployment project properties. To determine the Component ID, you must install the application and use a tool such as the MSI Spy tool included in the Windows Installer 1.1 Software Development Kit.

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

Community Additions