Hi,
I have found some code from microsoft which installs a new componet to a COM+ application:
' Open a session with the catalog.
' Instantiate a COMAdminCatalog object.
Dim objCatalog As COMAdminCatalog
Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")
' Create a new COM+ application.
' First get the "Applications" collection from the catalog.
Dim objApplicationsColl As COMAdminCatalogCollection
Set objApplicationsColl = objCatalog.GetCollection("Applications")
' Add a new item to this collection.
Dim objZooApp As COMAdminCatalogObject
Set objZooApp = objApplicationsColl.Add
' The "Applications" collection determines the available properties.
' Set the "Name" property of the new application item.
objZooApp.Value("Name") = "MyHomeZoo"
' Set the "Description" property of the new application item.
objZooApp.Value("Description") = "My pets at home"
' Save changes made to the "Applications" collection.
objApplicationsColl.SaveChanges
' Install components into the application.
' Use the InstallComponent method on COMAdminCatalog.
' In this case, the last two parameters are passed as empty strings.
objCatalog.InstallComponent("MyHomeZoo","MyZoo.DLL","","")
However the InstallComponent will not work just comes up with a com+ internal error:
The exact code I used was:
objCatalog.InstallComponent "MyHomeZoo","c:\TestDll.dll","",""
Has anyone got any ideas on this?
Thanks
Chris
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).