Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:


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????
1 Solution
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.

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.

SRIVBAuthor Commented:
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??
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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
Per recommendation, points NOT refunded and question closed.

CS Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now