Platform SDK: Exchange 2000 Server

Registering a System Event Sink Binding

[This is preliminary documentation and subject to change.]

The OnMdbStartup and OnMdbShutdown system events are defined only for a particular server or database and do not correspond to any particular folder or store. system events. The OnTimer system event has a special syntax. See Registering an OnTimer Event Sink Binding.

cscript RegEvent.vbs Add
                         SystemEvent
                         SinkClass
                         Scope
                         [-s ScriptFilePath]
SystemEvent
The system event for the binding. Can be one or more of the following: OnMdbStartup, OnMdbShutDown. Case is ignored when the binding is created or modified. Multiple events can be associated with the same binding by listing the events separated with semi-colons (;). For example, "onmdbstartup;onmdbshutdown." In this case, the bound sink would be notified of both the startup and the shutdown of any Exchange store database (mdb).
SinkClass
The class identifier (in registry format) or programmatic identifier of the sink COM class. For example, "MySinks.Sink" or {GUID}.
Scope
The fully qualified URL-name of the registration sink item to save to the store. This provides the name of the sink item as well as the event location (scope). For example, file://backofficestorage/domain/public%20folders/events/EventRegStearupItem1
ScriptFilePath
[optional] The full path to the script file containing sink code. An event scripting host is used to run the script if this value is set.

Note that system events have scope the same as other events. However the event is not location specific. Thus the meaning of the scope is nebulous. Scope does however define a specific location for the registration event item, which can affect the security context of the event sink, and guarantees that the event will be deleted if the folder containing the timer event registration is deleted.

Example

This example specifies the script host sink class (ExOleDB.ScriptEventSink), which then runs the script specified using the -s option.

cscript RegEvent.vbs add onmdbstartup ExOleDB.ScriptEventSink.1 -s c:\temp\script.vbs

See Also

Registering an OnTimer Event Sink Binding