Dim catalog As Object
Dim packages As Object
Dim newPack As Object
Dim componentsInNewPack As Object
Dim util As Object
On Error GoTo failed
Set catalog = CreateObject("MTSAdmin.Catalog.1")
Set packages = catalog.GetCollection("Packages")
Set newPack = packages.Add
Dim newPackID As String
newPackID = newPack.Key
newPack.Value("Name") = "My Package"
packages.SaveChanges
Set componentsInNewPack = packages.GetCollection("ComponentsInPackage", newPackID)
Set util = componentsInNewPack.GetUtilInterface
util.InstallComponent"d:\dllfilepath", "", ""
Exit Sub
failed:
MsgBox "Failure code " + Str$(Err.Number)
End Sub
See Also
MTS Administration Objects, MTS Collection Types, MTS Administration Object Methods, Automating Advanced MTS Administration with Visual Basic