The AddSoftwarePackage method creates an instance of the SoftwarePackage class, adds the corresponding ISoftwarePackage dispinterface to the SoftwarePackages collection, and returns the interface.
VBScript Syntax
IChannel.AddSoftwarePackage
Parameters
None
Return Value
The ISoftwarePackage dispinterface (VT_DISPATCH)
Remarks
The SoftwarePackages collection is a List object housing ISoftwarePackage dispinterfaces. You can use the AddSoftwarePackage method to add the interface, or do so explicitly. Both approaches are shown in the example below.
Example
VBScript and Windows Scripting Host
Set IDispChannel = CreateObject("Push.Channel")
IDispChannel.AddSoftwarePackage
' same as
Set IDispChannel = CreateObject("Push.Channel")
Set IDispSoftPack = CreateObject("Push.SoftwarePackage")
IDispChannel.SoftwarePackages.Add IDispSoftPack
See Also