View Full Version : Construct string in COM+ package
michail
10-31-2002, 12:28 PM
How can I set Construct string( which is on Activation tab) in COM+ installation?
Keppler
10-31-2002, 12:39 PM
You need to navigate through COMAdmin for this
code for reference only..
svAppID is the COM+ application ID guid
svClsID is the class ID of the dll to update with the constructor str.
Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")
Set objAppColl = objCatalog.GetCollection("Applications")
objAppColl.Populate
'// Update ComCatalog
For i = 0 To objAppColl.Count - 1
If objAppColl.Item(i).Key = svAppID Then
Set objCmptColl = objAppColl.GetCollection("Components", svAppID)
objCmptColl.Populate
For j = 0 To objCmptColl.Count - 1
If objCmptColl.Item(j).Key = svClsID Then
If Not IsNull(svConstruct) Then
Set objCmpt = objCmptColl.Item(j)
objCmpt.Value("ConstructionEnabled") = True
objCmpt.Value("ConstructorString") = svConstruct
objCmptColl.SaveChanges
objLog.WriteLine " Updated Class " & svClsID & " in " & svAppID
objLog.WriteLine " Construction Enabled with """ & svConstruct & """"
End If
Exit For
End If
Next
Exit For
End If
Next
michail
11-02-2002, 04:15 AM
Thanks. Right in the point.
Michail
Originally posted by Keppler
You need to navigate through COMAdmin for this
code for reference only..
svAppID is the COM+ application ID guid
svClsID is the class ID of the dll to update with the constructor str.
Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")
Set objAppColl = objCatalog.GetCollection("Applications")
objAppColl.Populate
'// Update ComCatalog
For i = 0 To objAppColl.Count - 1
If objAppColl.Item(i).Key = svAppID Then
Set objCmptColl = objAppColl.GetCollection("Components", svAppID)
objCmptColl.Populate
For j = 0 To objCmptColl.Count - 1
If objCmptColl.Item(j).Key = svClsID Then
If Not IsNull(svConstruct) Then
Set objCmpt = objCmptColl.Item(j)
objCmpt.Value("ConstructionEnabled") = True
objCmpt.Value("ConstructorString") = svConstruct
objCmptColl.SaveChanges
objLog.WriteLine " Updated Class " & svClsID & " in " & svAppID
objLog.WriteLine " Construction Enabled with """ & svConstruct & """"
End If
Exit For
End If
Next
Exit For
End If
Next
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.