Kim
Kim

Reputation: 37

Permission required for CreateInstance of COMserver from a service

I have created a simple windows service (e.g. MyService.exe) and a (ATL) COMserver (e.g. MyCOMServer.exe).

I would like the service to create an instance of an interface exposed by MyCOMServer. The COMserver currently does nothing.

It works if the service account is 'Local system', or a user which is member of the administrator group, but NOT with a standard user or 'Local service'

My question is, what are the minimum required user account permissions needed? Or does it only work with an account with administrator privileges?

Upvotes: 0

Views: 188

Answers (1)

kabekew
kabekew

Reputation: 16

Run dcomcnfg admin tool from an admin account, and either set the launch permissions for MyCOMServer specifically (better), or set the default COM permissions for everyone.

  1. Open Component Services
  2. Open Computers
  3. Either right-click "My Computer" to set permissions for all users, or open that up, open DCOM Config and find and right-click MyCOMServer which should be listed.
  4. For both Access Permissions and Launch and Activation Permissions you can add a specific user name, or add a name like INTERACTIVE for whoever is logged in locally, or EVERYONE for everyone. In those sections for the selected user, make sure Local Access, Local Launch and Local Activation are checked to "allow."

Upvotes: 0

Related Questions