Adding and Deleting Verbs

See Also

You use the Associations editor to associate verbs with a file extension in Microsoft® Visual Studio® Installer. The verbs establish the actions displayed when a user right-clicks files with that extension in Microsoft® Windows® Explorer. For example, if you associate the verb open with the file extension .rtf, Open is shown in the context menu when a user right-clicks an .rtf file in Windows Explorer.

Your users can select a context menu option to perform the action on the file. For example, if a user right-clicks on an .rtf file in Windows Explorer and sees Open on the context menu, selecting Open should open the .rtf file.

Important   In order for the context menu options to work, you must ensure your installed application knows how to process each verb you associate with any file extension.

In the Associations editor, you associate a verb with a file extension by adding the verb to the file extension. For more information, see To add verbs to file extensions.

In the Associations editor, you can also delete a verb from a file extension to break the association between them. This means the verb you delete will not be displayed on the context menu your users see when they right-click files with that extension in Windows Explorer. For more information, see To delete verbs from file extensions.

To add verbs to file extensions

Before adding and associating verbs with a file extension, you must add the file extension to your installer project. For more information about adding file extensions, see Adding and Deleting Document Types and Associated Extensions.

  1. In the Project Explorer window, expand the Target Machine node under your installer project.

  2. Double-click Associations in the Target Machine node.

    The Associations editor is displayed.

  3. If necessary, expand the Associations on Target Machine hierarchy to show the file extension you want to associate with a verb.

  4. In the Associations on Target Machine hierarchy, right-click the file extension you want to associate with a verb.

  5. Select Add Verb from the context menu.

    A new verb is associated with the file extension and shown in the Associations on Target Machine hierarchy with the label New Verb (or New Verb1, 2, 3, and so on).

  6. Type over the New Verb label to enter a valid name for the verb.

    You have now added and associated the verb with the file extension, as shown in the Associations on Target Machine hierarchy. The verb will be included in the context menu users display by right-clicking files of this extension in Windows Explorer.

To delete verbs from file extensions

  1. In the Project Explorer window, expand the Target Machine node under your installer project.

  2. Double-click Associations in the Target Machine node.

    The Associations editor is displayed.

  3. If necessary, expand the Associations on Target Machine hierarchy to show the file extension and the verb you want to delete.

  4. In the Associations on Target Machine hierarchy, right-click the verb you want to delete from the file extension.

  5. Select Delete from the context menu.

    The verb is deleted from the file extension and no longer shown in the Associations on Target Machine hierarchy. The verb will not be included in the context menu users display by right-clicking files of this extension in the Windows Explorer.