View Single Post
  #5  
Old 10-23-2003, 03:29 PM
smelly smelly is online now
Registered User
 
Join Date: 10-23-2003
Posts: 4
Delete Com+ Apps

I have a script step that nukes all standard com apps. Hope that helps.


Call DeleteCOMApp("App1")
Call DeleteCOMApp("App2")
Call DeleteCOMApp("Etc")
' and so on ..

Sub DeleteCOMApp(sAppName)
Dim oAdminCatalog
Dim oApps
Dim i, bFound

bFound = False

Set oAdminCatalog = CreateObject("COMAdmin.COMAdminCatalog")
Set oApps = oAdminCatalog.GetCollection("Applications")

oApps.Populate

For i = 0 To oApps.Count - 1
If oApps.Item(i).Name = sAppName Then
oAdminCatalog.ShutDownApplication(sAppName)
oApps.Remove (i)
oApps.SaveChanges
trace "Removed """ & sAppName & """ Application."
bFound = True
Exit For
End If
Next

If Not bFound Then trace "Skipping """ & sAppName & """. Could not find."

End Sub

Sub Trace(byval sMsg)
Builder.LogMessage sMsg
End Sub
Reply With Quote