OV_Action::Create()
OV_Action::Create_Trans()
- OV_Action Create(
- [in] string Command,
- [in] string Caption,
- [in, optional] string ParentName,
- [in, optional] sint32 CallType,
- [in, optional] string Name,
- [in, optional] string Description,
- [in, optional] string Parameters,
- [in, optional] boolean EditParameters,
- [in, optional] uint16 ExecuteOn,
- [in, optional] sint32 IOType,
- [in, optional] boolean EditLogin,
- [in, optional] string ExecuteAsUser,
- [in, optional] boolean RequirePassword,
- [in, optional] string Password,
- [in, optional] string PredefinedList[] )
- OV_Action Create_Trans(
- [in] string TransId,
- [in] string Command,
- [in] string Caption,
- [in, optional] string ParentName,
- [in, optional] sint32 CallType,
- [in, optional] string Name,
- [in, optional] string Description,
- [in, optional] string Parameters,
- [in, optional] boolean EditParameters,
- [in, optional] uint16 ExecuteOn,
- [in, optional] sint32 IOType,
- [in, optional] boolean EditLogin,
- [in, optional] string ExecuteAsUser,
- [in, optional] boolean RequirePassword,
- [in, optional] string Password,
- [in, optional] string PredefinedList[] )
Parameters
- TransId
- Transaction ID returned from OV_Transaction::Start().
- Command
- If the command type (parameter callType) is executable, it is
an executable path. If the command type is one of the script types,
it contains a script. If the command type is URL, it contains an
URL.
- Caption
- Caption (Display Name). If a tool with the same Caption/Display
is already a child of the parent tool group, nothing happens, and
the method fails with MDLAPI_E_TOOL_HIERPATH_EXISTS. If the Caption
parameter is an empty string, contains invalid characters, or has
more than 1024 characters, the method fails with
MDLAPI_E_INVALID_CAPTION.
- ParentName
- The Name property of the instance of OV_Tools where the newly
created tool is added. Optional parameter. If the parameter is not
specified, or if it is equal to an empty string, the root tool
group is used. If the specified tool group does not exist, the
method fails with MDLAPI_E_PARENT_TOOLGROUP_NOT_EXIST.
- CallType
- Copied to CallType property. Optional parameter. Default is 0
("Executable").
- Name
- The Name property of the instance of OV_Action to be created.
Optional parameter. If you do not specify the parameter, or if it
is equal to an empty string, it is created as a new GUID. If a tool
with the same Name already exists, nothing happens, and the method
fails with MDLAPI_E_TOOL_NAME_EXISTS.
- Description
- Copied to the Description property. Optional parameter.
- Parameters
- Copied to the Parameters property. This parameter is applicable
only when the CallType is equal to 0 ("Executable"). Optional
parameter.
- EditParameters
- Copied to the EditParameters property. This parameter is
applicable only when the CallType is equal to 0 ("Executable").
Optional parameter. Default is false.
- ExecuteOn
- Copied to the ExecuteOn property. When the CallType is equal to
one of the script types, this parameter may not equal 3
("Console"). When the CallType is equal to 100 ("URL"), this
parameter must equal 3 ("Console"). Optional parameter. Default is
0 ("Management Server").
- IOType
- Copied to IOType property. This parameter is applicable only
when ExecuteOn is not equal to 3 ("Console"). Optional parameter.
Default is 0 ("NoOutput").
- EditLogin
- Copied to EditLogin property. This parameter is applicable only
when ExecuteOn is not equal to 3 ("Console"). Optional parameter.
Default is false.
- ExecuteAsUser
- Copied to ExecuteAsUser property. This parameter is applicable
only when ExecuteOn is not equal to 3 ("Console"). Optional
parameter.
- RequirePassword
- Copied to RequirePassword property. This parameter is
applicable only when ExecuteOn is not equal to 3 ("Console").
Optional parameter. Default is false.
- Password
- Copied to Password property. This parameter is applicable only
when ExecuteOn is not equal to 3 ("Console"), and only when
RequirePassword is equal to true. Optional parameter.
- PredefinedList
- Copied to PredefinedList property. This parameter is applicable
only when ExecuteOn is equal to 2 ("Node List"). Optional
parameter.
Calling Convention
These methods can be called from a WMI class or instance
object.
Description
Creates a tool (new instance of OV_Action), and adds it to the
existing tool group (instance of OV_Tools).
All parameters are validated before the tool is actually
generated. If any parameter does not match, the method fails with
MDLAPI_E_INVALID_PARAMETER.
Return Value
Instance of the newly created OV_Action.
Extended Status Codes
- MDLAPI_E_INVALID_PARAMETER
- Parameter is not valid.
- MDLAPI_E_INVALID_CAPTION
- Specified object Caption parameter is not valid.
- MDLAPI_E_TOOL_NAME_EXISTS
- Tool with the same Name already exists.
- MDLAPI_E_TOOL_HIERPATH_EXISTS
- Tool with the same Caption is already a child of the parent
tool group.
- MDLAPI_E_PARENT_TOOLGROUP_NOT_EXIST
- Parent Tool Group does not exist.
- MDLAPI_E_TRANSACTION_NOT_EXIST
- Transaction with the specified ID does not exist.