RefreshScript Property

The RefreshScript property is a string specifying the name of an agent script to use during the refresh cycle if the RefreshType property contains the value "userscript" or "custom" when the Refresh method is invoked on the class Channel object. This script is used as the refresh agent. The value can be a full file system path, a relative path, or simply a name, in which case the default "c:\microsoft site server\bin" directory is assumed to contain the script.

Type

String (VT_BSTR)

Default

Null

Example

In this example, the custom refresh agent simply adds two Item objects to the Channel object during the refresh cycle.

Contents of file build_project.vbs

'  Using VBScript and Windows Scripting Host
'   Here the channel is configured and refreshed
Set Prj = CreateObject("Push.Project")
Prj.Channel.RefreshType="UserScript"
Prj.Channel.refreshscript=".\CustomAgentScript.vbs"
call Prj.Channel.Refresh(Prj)


At this point the contents of the file CustomAgentScript.vbs are passed to the scripting host for parsing and execution. The script could look simply like this:

channel.AddItem()
channel.AddItem()

© 1997-1998 Microsoft Corporation. All rights reserved.