Don't panic!

 

Cry about...
MS-Windows Troubleshooting


DllRegisterServer in COM failed.
Return code was: 0x80070005


Symptom:

When attempting to register a COM object (e.g. Active-X component or OCX) with ‘Regsvr32’, i.e.:

regsvr32 COM

it fails with a message box displaying:

DllRegisterServer in COM failed.
Return code was: 0x80070005

Where ‘COM’ is the name of the COM object file.

Cause:

The error value ‘0x80070005’ means ‘Access Denied’.

This means that an attempt has been made to update part of the registry that you do not have permissions to update. There are many parts of the registry that can be read but not updated (except by ‘system’ or the local administrator).

Possibly Remedies:

  • Check that you have local administration rights.
  • If you are a local administrator (i.e. a member of the ‘Administrators’ group on the workstation) then most likely someone or some application has modified (intentionally or unintentionally) the permissions on one or more registry keys and that this is preventing access. (Alternately, it may be that the key that is failing is one that normally only ‘system’ can update.) To identify which registry key is causing the problem use Regmon (a freeware tool published by System Internals). Use Regmon to capture all registry access when regsvr32 is run. If an ‘OpenKey’ request fails with ‘Access Denied’ (which is listed by Regmon as ‘ACCDENIED’) then run regedt32 and check the permissions on that registry key. If necessary change the permissions on the key to grant local Administrators ‘Full Control’. They try registering the COM object again. The only times I have encountered this problem it affected more than one key, so be prepared to repeat this process.

These notes have been tested with Windows NT4.



About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.