Skip to content

Latest commit

 

History

History
116 lines (68 loc) · 4.51 KB

actioncollection-create.md

File metadata and controls

116 lines (68 loc) · 4.51 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
ActionCollection.Create method
For scripting, creates and adds a new action to the collection.
f33542e1-ee49-4696-b2ab-c48a9b5440d4
Create method Task Scheduler
Create method Task Scheduler , ActionCollection object
ActionCollection object Task Scheduler , Create method
apiref
ActionCollection.Create
taskschd.dll
COM
reference
05/31/2018

ActionCollection.Create method

For scripting, creates and adds a new action to the collection.

Syntax

ActionCollection.Create( _
  ByVal type _
)

Parameters

type [in]

This parameter is set to one of the following TASK_ACTION_TYPE enumeration constants.

Value Meaning
TASK_ACTION_EXEC
0
The 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
The action fires a handler.
TASK_ACTION_SEND_EMAIL
6
This action sends email message.
TASK_ACTION_SHOW_MESSAGE
7
This action shows a message box.

Return value

An Action object that represents the new action.

Remarks

You cannot add more than 32 actions to the collection.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

TASK_ACTION_TYPE

Task Scheduler

ActionCollection

Action

ExecAction

EmailAction

ShowMessageAction

ComHandlerAction