Platform SDK: Exchange 2000 Server

The RegEvent Script

[This is preliminary documentation and subject to change.]

The RegEvent.vbs script is a useful tool to register, enumerate and delete event sink registrations. The code in the VB script may also prove useful for you in developing your own registration scripts.

The following defines the RegEvent.vbs script parameters for the:

cscript RegEvent.vbs Add
                             EventName
                             SinkClass
                             Scope
                             [-p Priority] 
                             [-m MatchScope] 
                             [-f CriteriaFilter] 
                             [-s ScriptFilePath] 
EventName
The name of the store or system event should be one or more of the following:

OnSave, OnDelete, OnSyncSave, OnSyncDelete, OnMdbStartup, OnMdbShutDown, or OnTimer

Case in the names is ignored. Multiple events can be specified in the same registration by placing semi-colons (;) between the names of each event. For example, "OnSave;OnDelete."

SinkClass
This is the class identifier (in registry format) or programmatic identifier of the sink COM class. For example, "MySinks.SaveSink.1"
Scope
This is the name of the sink registration item. Where you save a sink registration item defines its scope. For example, the Scope name file://backofficestorage/domain/public%20folders/myfolder/EventRegItem1 registers for events in "myfolder".
Priority
[optional] The registration’s relative priority. See Sink Priority_exch2k_Sink_Priority.
MatchScope
[optional] The scope for the binding. Can be one of DEEP | SHALLOW | EXACT | ANY. Bindings with no defined scope default to EXACT.
CriteriaFilter
[optional] An SQL WHERE clause defining additional conditions that must be met by a triggering item for the sink to be notified of the event. For example, WHERE CONTAINS("urn:schemas:mailheader:to","someone@somedomain.tld"). See remarks.
ScriptFilePath
[optional] This is the full path to the script file containing the event to handle the sink notification. An event scripting host is used to run the script if this value is set.

Remarks

The Exchange store must be running to add store event registrations.

See information on the criteria property of the Registration Item for details on the CriteriaFilter

See the programming tasks section of this topic for examples of registering scripted event sinks.