Posted on 2001-08-03
Medium Priority
Last Modified: 2008-02-01
Hello Experts!!!

I want to configure DCOM related settings (in client and server) for my component (ActiveX dll & exe) , while running the component's setup.  I don't want to use "dcomcnfg.exe" and "clireg32.exe" for that.  (But now i'm using that.)

How i can programatically accomplish all those things which we are doing using those utility programs.  I'm also sure we can, because some programs already doing all those settings, (like dcom registration, MTS registration etc.,) when we are installing them.

Is there anybody to help me please????
Question by:SRIVB
LVL 22

Expert Comment

ID: 6348488
here's a small article of the MSDN libraries. It means that you can use the normal registry api functions to set up the DCOM environment. It shows a small example (manual setting regisytry settings), but you can get the correct functionality too if you use the Registry API functions. I hope it is clear.


Changing the Registry Manually
You can also make many of these modifications manually instead of using the DCOMCNFG tool, as follows:

Using the registry editor, modify the server application's registry entries on the client and the server machines. The following registration information uses the REGEDIT4 syntax where the key is specified in square brackets. The line after each key specifies a name and a value. The name is on the left of '=' and the value on the right.
   '@' on the left indicates a value without a name. Replace the following
   GUIDs with your GUIDs. You can generate a new GUID for AppID (using
   uuidgen.exe), or use the same GUID as the CLSID. Replace hello.exe with
   your server's EXE name and replace 'Hello App' with a string that
   describes your server application:

   ;;;; CLSID key

   ;;;; AppID key
   @="Hello App"


Remove any InprocServer32 and LocalServer32 keys from the server application's registry entries on the client machine. (These should not be removed on the server machine where the server application resides.) Add the following key to the server's registry entries on the client machine. Use the same GUID for the AppID as in the previous step. Replace server_machine_name with the name of the machine on which the server is located:
[HKEY_CLASSES_ROOT\APPID\{0bf52b15-8cab-11cf-8572-00aa00c006cf}] "RemoteServerName"="server_machine_name"

On the server machine, use DCOMCNFG or the OLE View tool to specify access and launch permissions for the server application. See the sections in this article that describe these tools for more information about how to specify permissions.

Expert Comment

ID: 6348729

PDW - can do some job for you...

just when you compile *.dll you need to check remote files ..

Package and Deployment Wizard ? Remote Servers

Allows you to provide or modify the settings necessary for the end user's machine to find and connect to a remote server. When end users install the package, they will be required to provide any information necessary for the connection that you did not enter here.

This screen only appears if your package includes one or more .vbr files. These and all included files are listed on the Included Files screen; they are either needed by your project, manually added to the package on the Included Files screen, or needed by another file in the package.

Remote Servers List

Displays the name and current location of each .vbr file, and provides columns in which you can specify the necessary connection settings:

Net Address ? The network address of the machine where the server application will be installed. If you leave this column blank, your users will be asked for this information when they install the package.

Connection Type ? Choose whether your application uses DCOM (Distributed Component Object Model) or RA (Remote Automation) to access the remote component.

Protocol ? Displays a list of the network protocols from which you can choose. Available only if you selected RA (Remote Automation) as the connection type. If you want the end user to supply the information, choose "(End user must specify)."

Authentication ? Available only if you selected RA (Remote Automation) as the connection type. Required. For more information, see RPC Security in your Windows NT documentation.

When you move the mouse cursor over an entry in the remote servers list, a tooltip appears, listing the files for which the given file is needed or stating that the given file was manually added to the list.


Author Comment

ID: 6351066
I already read those MSDN articles, but they are little confusing.  Using dcomcnfg utility i can configure some general machine settings(Enable/Disable DCOM, Default Authentication, Default Impersonation.. etc.,) as well as some settings which are specific to my component(Access Permissions, Launch Permissions, identity, activation..etc.,).  I want to do all those settings thru my program.

So can you please give some code (or) logic, specific to my requirement??
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Expert Comment

ID: 7095032
LVL 49

Expert Comment

ID: 7198452
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.
    *** Unsure if any answer worked and too few points to split.

SRIVB, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
DanRollins -- EE database cleanup volunteer

Accepted Solution

Netminder earned 0 total points
ID: 7213321
Per recommendation, points NOT refunded and question closed.

CS Moderator

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month9 days, 22 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question