64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
|
// **************************************************************************
|
||
|
// Copyright (c) Microsoft Corporation.
|
||
|
//
|
||
|
// File: CmdEvTgProv.mof
|
||
|
//
|
||
|
// Description:
|
||
|
// Defines the instances required to register an event consumer
|
||
|
// provider, and the class representing this consumer.
|
||
|
//
|
||
|
// History:
|
||
|
//
|
||
|
// **************************************************************************
|
||
|
|
||
|
//the namespace to which the provider belongs to.
|
||
|
#pragma namespace ("\\\\.\\Root\\cimv2")
|
||
|
|
||
|
// Register the provider.
|
||
|
instance of __Win32Provider as $Provider
|
||
|
{
|
||
|
Name = "CmdTriggerConsumer";
|
||
|
ClsId = "{797ef3b3-127b-4283-8096-1e8084bf67a6}";
|
||
|
HostingModel = "LocalSystemHost";
|
||
|
};
|
||
|
|
||
|
// register the provider as method provider
|
||
|
instance of __MethodProviderRegistration
|
||
|
{
|
||
|
Provider = $Provider;
|
||
|
};
|
||
|
|
||
|
// register the provider as consumer provider
|
||
|
instance of __EventConsumerProviderRegistration
|
||
|
{
|
||
|
Provider = $Provider;
|
||
|
ConsumerClassNames = { "CmdTriggerConsumer" };
|
||
|
};
|
||
|
|
||
|
//define the provider class with the properties and the methods which it supports.
|
||
|
[ provider( "CmdTriggerConsumer" ) ]
|
||
|
class CmdTriggerConsumer : __EventConsumer
|
||
|
{
|
||
|
// properties
|
||
|
[ key ] uint32 TriggerID;
|
||
|
[ read ] string TriggerName;
|
||
|
[ read ] string Action;
|
||
|
[ read ] string ScheduledTaskName;
|
||
|
[ read, write ] string TriggerDesc;
|
||
|
|
||
|
// methods
|
||
|
[ implemented, static ]
|
||
|
uint32 CreateETrigger( [ IN ] string TriggerName,
|
||
|
[ IN ] string TriggerDesc,
|
||
|
[ IN ] string TriggerAction,
|
||
|
[ IN ] string TriggerQuery,
|
||
|
[ IN ] string RunAsUser,
|
||
|
[ IN ] string RunAsPwd );
|
||
|
[implemented, static]
|
||
|
uint32 DeleteETrigger( [ IN ] string TriggerName );
|
||
|
|
||
|
[implemented, static]
|
||
|
uint32 QueryETrigger( [ IN ] string ScheduledTaskName,
|
||
|
[ OUT ] string RunAsUser );
|
||
|
};
|