0 Replies Latest reply on Sep 24, 2007 6:39 AM by Mark Jeffery

    Setting Identity and Password on COM+ objects

    Mark Jeffery



      If you try to package and deploy COM+ Identity and Password using COM+ configuration objects, you will unfortunately fail because the Identity and Password are not set at the same time. (also Password is not shown as a browseable configuration object)


      The way to work around this, is to use a vbs script. I found mine on the internet on dotnet247 (just google for wmi COM+)


      I created a vbs script that looks like this:

      ' Script to change Identity and password for Biztalk Interchange Server

      Option explicit


      Dim objArgs

      Dim appID

      Dim Identity

      Dim Password


      Set objArgs = WScript.Arguments

      appID = objArgs(0)

      Identity = objArgs(1)

      Password = objArgs(2)


      WScript.echo "App ID is " & appID

      WScript.echo "Identity is " & Identity


      Dim catalog, root

      set catalog = CreateObject("COMAdmin.COMAdminCatalog")

      set root = catalog.Connect("localhost")


      Dim appsCol

      Set appsCol = catalog.GetCollection("Applications")

      appsCol.PopulateByKey Array(appID)


      Dim obj

      for each obj in appsCol

      obj.Value("Identity") = Identity

      obj.Value("Password") = Password




      -- end of script

      and in a BlPackage, you just need to include this file, and an external command that runs it.


      The first parameter is the Application ID for the application. Go to Start->Programs->Admin Tools->Component Services


      Expand the COM+ Applications, right click and show properties. This will show the Application ID


      The second parameter is the username to be used, and the third is the password to be used.


      I used this for Biztalk Server deployment, and had to include



      Modify COM+ Applications/BizTalk Server Interchange Application/Changeable = -1 at the beginning (this unlocks the property pages)



      Modify COM+ Applications/BizTalk Server Interchange Application/Changeable = 0 at the end (to lock the pages back again).