The GetAgents method returns a class Dictionary object's dispinterface. The keys are names of installed agents and the associated values are arrays (SAFEARRAYS) of configuration information for the agent.
VBScript Syntax
IManager.GetAgents
Parameters
None
Return Value
The IDictionary dispinterface.
Remarks
The Dictionary object stores key/value pairs that describe the various installed agents. Each key is a name of an agent, and each value is an array (SAFEARRAY) with six elements that define the agent. The table below lists the items in the order in which they appear in the array.
All information returned in the array by this method is contained in the registry at key HKLM\Software\Microsoft\Site Server\3.0\Active Channel Agents. Each agent name is a subkey, and the six values associated are the named values stored under the key.
Array index | Reg Key named value | Description of indexed value |
0 | ASP Property Page | This ASP page is used by the WebAdmin tool to set options for this agent. |
1 | ASP Wizard Page | This ASP page is used by the WebAdmin tool to start the agent options wizard. |
2 | COM Property Sheet | This value is a GUID identifying the COM class that implements an IPropertySheet interface. This class is "bootstrapped" by the Microsoft® Management Console (MMC) tool when a user requests to set options for this agent. |
3 | Display Name | This value is the display name for the agent. |
4 | Script Language | This value specifies the scripting language that the Active Scripting Host should use to run the agent. |
5 | Script Pathname | This value specifies the path to the agent script. |
Example
' Using Windows Scripting Host and VBScript
Option Explicit
Dim Agents
Dim Manager
Dim Items
Set Manager = CreateObject("Push.Manager")
Set Agents = Manager.GetAgents
For Each Agent in Agents
wscript.echo "Agent Name: " & Agent
wscript.echo "Agents definition items: "
Items = Agents(Agent)
For i = LBOUND(Items) to UBound(Items)
wscript.echo Items(i)
Next
Next
See Also