Dim catalog
Dim collections
Dim application
Dim object
Dim components
Dim component
Dim Login
Dim Password
Dim URL
Login = "Varlogin"
Password = "VarPwd"
URL = "VarURL"
On Error Resume Next
'Navigate the COM+ Catalog
set catalog = CreateObject("COMAdmin.COMAdminCatalog")
set collections = catalog.GetCollection("Applications")
Call collections.Populate
For Each application In collections
wscript.echo application.Name
if application.Name = "Hub.Security" then
set object = application
object.Value("Identity") = Login
object.Value("Password") = Password
End If
Next
'Navigating collections within components is a bit weird. 'You specify the call in form 'root.GetColllection(collectioname, objectkey)
'set components = collections.GetCollection("Components", object.key)
'components.Populate
'For Each component In components
' component.Value("ConstructorString") = URL
'Next
Call components.SaveChanges
Call collections.SaveChanges
catalog.StartApplication("ComponentName")
set catalog = Nothing
set collections = Nothing
set application = Nothing
set object = Nothing
set components = Nothing
set component = Nothing
|