Platform SDK: Exchange 2000 Server

Registering a Store Event Sink Binding

[This is preliminary documentation and subject to change.]

The following demonstrates how to register a sink binding for a folder OnSyncSave event.

cscript RegEvent.vbs Add
                             OnSave
                             SinkClass
                             Scope
                             [-p Priority] 
                             [-m MatchScope] 
                             [-f CriteriaFilter] 
                             [-s ScriptFilePath] 
                             [-r] (reliable)
OnSave
OnSave is the name of the store event for the binding.
SinkClass
The class identifier (in registry format) or programmatic identifier of the sink COM class. For example, "MySinks.SaveSink."
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/EventRegItem1
Priority
[optional] The binding’s relative priority. Values range from 0x0000 (max) to 0xFFFFFFFF (min). The default is 0xFFFF. Sinks with no explicit priority set default to 0xFFFF. Sinks with the same priority run in indeterminate order.
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] 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. If no script is specified,
Reliable
[optional] Specifies if the event is to be reliable.

Example

cscript RegEvent.vbs add "onsave;ondelete" sink1.sink1.1 file://./backofficestorage/exchange.microsoft.com/user1/inbox/EventRegItem1 -p 0x3f -m deep -s d:\test.vbs

cscript RegEvent.vbs add onsyncsave sink.sink.1 file://backofficestorage/domain/public%20folders/events/EventRegItem2 

See Also

The RegEvent.vbs Script