IExecuteCommand interface (shobjidl_core.h)

Exposes methods that set a given state or parameter related to the command verb, as well as a method to invoke that verb.


The IExecuteCommand interface inherits from the IUnknown interface. IExecuteCommand also has these types of members:


The IExecuteCommand interface has these methods.


Invoke the verb on the selected items. Call this method after you have called the other methods of this interface.

Sets a new working directory.

Sets a value based on the current state of the keys CTRL and SHIFT.

Indicates whether any UI associated with the selected Shell item should be displayed.

Provides parameter values for the verb.

Sets the coordinates of a point used for display.

Sets the specified window's visual state.


When to Implement

Implement this interface when you choose it as your method to invoke the verb to perform an action on selected items. The items are passed as a Shell item array through IObjectWithSelection::SetSelection, so the object must also implement IObjectWithSelection.

When to Use

Do not call the methods of IExecuteCommand directly. Windows Explorer calls your IExecuteCommand methods when the user wants to perform an action on the items.

Note that, apart from Execute, the methods of this interface pass system information to the handler. The system itself calls these methods, setting the parameters appropriately based on system settings and conditions.


Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)