IAction::Type property

Gets the type of action.

This property is read-only.

Syntax


HRESULT get_Type(
  [out] TASK_ACTION_TYPE *pType
);

Property value

This property returns one of the following TASK_ACTION_TYPE enumeration constants.

ValueMeaning
TASK_ACTION_EXEC
0

This action performs a command-line operation. For example, the action could run a script, launch an executable, or, if the name of a document is provided, find its associated application and launch the application with the document.

TASK_ACTION_COM_HANDLER
5

This action fires a handler.

TASK_ACTION_SEND_EMAIL
6

This action sends an email message.

TASK_ACTION_SHOW_MESSAGE
7

This action shows a message box.

 

Error codes

NameMeaning
S_OK

The property value was successfully retrieved.

Remarks

The action type is defined when the action is created and cannot be changed later. For information on creating an action, see IActionCollection.Create.

For information on how actions and tasks work together, see Task Actions.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

TASK_ACTION_TYPE
Task Scheduler
IAction

 

 

Show: