I have an application written in vb6 that calls a function to create a com+ application and install the components. This work for win2k see below, but does not work for win 2003. Any ideas?
Function SetupiPort() As Boolean ' Return False if any errors occur.
' Initialize error handling for this function.
SetupiPort = False
' On Error GoTo My_Error_Handler
' 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 objcomApp As COMAdminCatalogObject
Set objcomApp = objApplicationsColl.Add
' The "Applications" collection determines the available properties.
' Set the "Name" property of the new application item.
objcomApp.Value("Name" = "MyComponents"
' Set the "Description" property of the new application item.
objcomApp.Value("Description" = "My Components"
' 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 "MyComponents", "c:\mydll\myvers30.dll", "", ""
Exit Function
Function SetupiPort() As Boolean ' Return False if any errors occur.
' Initialize error handling for this function.
SetupiPort = False
' On Error GoTo My_Error_Handler
' 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 objcomApp As COMAdminCatalogObject
Set objcomApp = objApplicationsColl.Add
' The "Applications" collection determines the available properties.
' Set the "Name" property of the new application item.
objcomApp.Value("Name" = "MyComponents"
' Set the "Description" property of the new application item.
objcomApp.Value("Description" = "My Components"
' 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 "MyComponents", "c:\mydll\myvers30.dll", "", ""
Exit Function