Share via


How to: Add a Registry Launch Condition

Predefined registry launch conditions allow you to add both a registry search and a launch condition in a single step based on the search. For example, you might search a target computer for a specific registry key or value, 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.

Note

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 registry launch condition

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

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

  3. Select the Search for RegistryEntry node. In the Properties window, select the Root property and select the registry root to be searched.

  4. Select the RegKey property and type the name of the registry key to search for. This should include the full path to the registry key, excluding the root.

    Note

    A registry search cannot verify that a registry key exists unless the registry key contains a non-null value.

  5. Optionally, set the Value property to search for a specific value in the registry key.

    Note

    A registry search cannot verify that a value exists unless it contains a non-null value.

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

See Also

Tasks

How to: Use a Registry Launch Condition to Specify a Target Directory

Reference

Properties for the Launch Conditions Editor

Other Resources

Launch Condition Management in Deployment