Q. You cannot clear the Enable Authentication check box for a COM+ library application in the Component Services administrative tool in Windows Server 2003?
Jerold Schulman
December 12, 2006
1 Min Read
You cannot clear the Enable Authentication check box for a COM+ (Component Object Model) library application in Component Services on Windows Server 2003.
This behavior is the result of conflict in the data update process that occurs between the GUI and the COM+ catalog.
Microsoft had written the ChangeAuthentication.vbs script to modify the authentication property of a COM+ library application.
The syntax for using the ChangeAuthentication.vbs script is:
cscript ChangeAuthentication.vbs
Where:
is the COM+ library application for which you want to change the authentication property. is on to enable authentication and off to disable authentication.
NOTE: If you use ChangeAuthentication.vbs to disable authentication, the user interface for the Component Services tool will still display a selected Enable Authentication check box.
ChangeAuthentication.vbs contains:
Option ExplicitDim AppNameDim oArgsDim lRetDim SwitchSet oArgs = WScript.ArgumentsIf oArgs.Length 2 ThenWScript.Echo "usage:"WScript.Echo ">cscript ChangeAuthentication.vbs "ElseAppName = oArgs(0)Switch = oArgs(1)lRet = EnableAuthentication(AppName, Switch)End If'====================================================
' EnableAuthentication' Param stAppName COM+ Application name' Param stSwitch on - check "Authentication", off - uncheck'
====================================================Function EnableAuthentication(stAppName, stSwitch)Dim oCatalogDim oAppsDim oAppSet oCatalog = CreateObject("ComAdmin.COMAdminCatalog")Set oApps = oCatalog.GetCollection("Applications")oApps.PopulateWScript.Echo("Searching " & stAppName & "...")For Each oApp In oAppsIf UCase(oApp.Name) = UCase(stAppName) ThenWScript.Echo("Found " & stAppName & ". ")Exit ForElse' WScript.Echo("AppName " & oApp.Name & " No Match.")End IfNextIf oApp.Value("Activation") 0 ThenWScript.Echo("AppName " & oApp.Name & " is not Library Application.")EnableAuthentication = -1Exit FunctionEnd IfIf UCase(stSwitch) = UCase("on") ThenoApp.Value("Authentication") = 0ElseIf UCase(stSwitch) = UCase("off") ThenoApp.Value("Authentication") = 1ElseWScript.Echo("Switch is invalid.")EnableAuthentication = -1Exit FunctionEnd IfoApps.SaveChanges()WScript.Echo("Finished.")EnableAuthentication = 0End Function
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like