PDA

View Full Version : Dcomcng



jjohnson@wausau
11-11-2003, 03:24 PM
I need to change a DCOMCNFG setting. Change the Authentication Level to NONE. This is done manually by running DCOMCNFG from the Start-Run menu and then it's in the General tab for the application I choose. Is there a way to do this programmatically in installshield?

RichAquino
11-11-2003, 04:14 PM
Hi,

There isn't native InstallScript code to do this. If there is an API to do it, you'll be able to prototype the API and call it in InstallScript. I don't know of such an API though.

Rich

hidenori
11-20-2003, 06:26 PM
The DCOM security-related settings are stored in an AppId registry entry. The AuthenticationLevel named-value is that you want to configure. You need to write a code to change the registry value.

Hope this helps,
Hidenori Yamanishi
InstallShield Software Corporation

Writzer
08-06-2004, 09:53 AM
Originally posted by hidenori
The DCOM security-related settings are stored in an AppId registry entry. The AuthenticationLevel named-value is that you want to configure. You need to write a code to change the registry value.

Hope this helps,
Hidenori Yamanishi
InstallShield Software Corporation

Hi,

I'm struggling also with a DCOM setting, can u please spend more words on the subject? I don't get it. Is there somewhere a sample code? :confused:

Manish Siwach
08-09-2004, 01:14 AM
As I'm working on Windows Server 2003, the below sample code will work to set the "Identity", start the com+ component ,set the "Authenicate Message" and "Server Name" under Activation Type.

'********************************************
Dim catalog
Dim collections
Dim application
Dim object
Dim components
Dim component
Dim Login
Dim Password
Dim URL

Login = "Varlogin"
Password = "VarPwd"
URL = "VarURL"

On Error Resume Next

'Navigate the COM+ Catalog
set catalog = CreateObject("COMAdmin.COMAdminCatalog")
set collections = catalog.GetCollection("Applications")
Call collections.Populate

For Each application In collections
wscript.echo application.Name

if application.Name = "COM_Name" then
set object = application
object.Value("Identity") = Login
object.Value("Password") = Password
object.Value("QCAuthenticateMsgs") = 1
End If

Next

'Navigating collections within components is a bit weird. 'You specify the call in form 'root.GetColllection(collectioname, objectkey)
'set components = collections.GetCollection("Components", object.key)
'components.Populate

'For Each component In components
' component.Value("ConstructorString") = URL
'Next

Call components.SaveChanges
Call collections.SaveChanges

catalog.StartApplication("COM_Name")

set catalog = Nothing
set collections = Nothing
set application = Nothing
set object = Nothing
set components = Nothing
set component = Nothing
'************************************
*Save the file as .vbs file.
*Replace COM_Name string with your COM+ component name.
*May be you have to do some R&D on this code ,to reflect the changes on your COM+.


Hope this will help you. :)