Shell Verb

A Shell Verb object represents a shell verb registration or unregistration. It is a child of a File Type and is used to associate applications with the file types that they handle. Shell verbs appear on the context menus of files in Windows Explorer, but can also be invoked programmatically. Registration or unregistration of a shell verb is controlled by its component and its application's executable:

Situation Action
Not linked to a component The shell verb is registered if its application executable is installed*.
Linked to a component The shell verb is registered if its component is installed*.

*This in turn may cause the parent File Type to be registered and, through that, the associated File Extensions.

See File types for more information.


The following attributes and options are available.

Attribute Description
Shell verb Select the shell verb from the drop-down list, or enter your own shell verb name. The drop-down list contains the most common shell verbs; you should use one of these if applicable. However, you may also define your own if that is more appropriate.
Menu text

Enter the user-visible text that must be displayed on the Windows shell context menu to represent the shell verb. You can use an ampersand ('&') prefix to designate a keyboard accelerator.

Tip: For standard verb names (the ones that appear in the Shell verb drop-down list), you do not have to enter a menu text. Windows will automatically display the appropriate menu text for these verbs, except for a few (such as printto) that are used internally by the Windows shell and are not displayed on context menus.

Executable Enter the path to the application's executable file that implements the shell verb, or click ... (browse) to open the Select Installation File or Folder dialog box that allows you to browse for the desired file.

Enter the arguments that must be passed to the applicatiob to implement the shell verb. The arguments may include any application-specific options, plus the following placeholders:

Placeholder Description
%1 File path of the file that must be opened, played, printed, etc.
%2 [printto] Name of the printer on which to print.
%3 [printto] Name of the printer driver used for printing - obsolete.
%4 [printto] Name of the printer port used for printing - obsolete.

Tip 1: Because these placeholders may expand to file paths and names that contain spaces, you should quote them in the Arguments field, for example "%1".

Tip 2: If you use the DDE options (below), then the Arguments field must typically be set to /dde to tell the application to start a DDE conversation.

DDE command

Enter the DDE command string if the shell verb must start a DDE conversation with the application; leave it empty for no DDE conversation. In that case, the remaining DDE-related arguments are ignored.

The DDE command is typically Open("%1") or [open("%1")], using the same placeholders as above.

DDE application Enter the name of the application with which to conduct the DDE conversation, or leave empty to use the file name from the Executable field.
Topic Enter the topic name for the DDE conversation.
IfExec Enter the DDE command that must be used if the DDE conversation cannot be initialized. If you specify this field, it will be used as the DDE command when the conversation is retried by starting Executable. If you leave this field empty, DDE command is used instead.

Related topics

File types, Working with attribute panes