Platform SDK: CDO for Windows 2000 |
Each registered SMTP or NNTP event sink has a set of property bags that represent groups of related properties for the binding. The Source property bag contains the Rule and Priority properties that can be used to set the protocol rule and relative firing priority for the sink defined by the binding. When configuring a binding for a CDO event scripting host, the Sink property bag can be set with the ScriptName property. This property is the path to the script that the host should run when handling the event. The smtpreg.vbs and nntpreg.vbs scripts provide a flag and arguments that add or update properties for the sink bindings as follows:
cscript [smtpreg | nntpreg].vbs /setprop instance event display name property bag name property name property value
cscript smtpreg.vbs /setprop 1 onarrival MySMTPScriptingHostSink Sink ScriptName "c:\path\to\script.vbs" cscript nntpreg.vbs /setprop 1 onpost MyNNTPScriptingHostSink Sink ScriptName "c:\path\to\script.vbs"
This shows setting an explicit priority for the binding:
cscript smtpreg.vbs /setprop 1 onarrival MySink Source Priority 344 cscript nntpreg.vbs /setprop 1 onpost MySink Source Priority 24575