I have a number of VBScripts to manage the COM+ components in an application upgrade. I have a script to add new components from a folder of DLL's. The final piece of my install is to set the TXIsolationLevel of the components.
Please see the attached. If anyone can get this snippet of code to work I'll be over the moon.
The WScript.Arguments.Item(0) is passed in from the command line as the name of my COM+ application. The iteration through the components works however the syntax for setting the isolation level isn't right.
Many thanks in advance,
Dim oCatalog, oApplications, oApp, oComps, oComponent, i
Set oCatalog = CreateObject("ComAdmin.COMAdminCatalog")
Set oApplications = oCatalog.GetCollection("Applications")
For Each oApp In oApplications
If oApp.Name = WScript.Arguments.Item(0) Then
Set oComps = oApplications.GetCollection("Components", oApp.value("ID"))
For i = oComps.Count -1 To 0 Step -1
Set oComponent = oComps.Item(i)
oComponent.Value("TXIsolationLevel") = COMAdminTxIsolationLevelReadCommitted