You Receive a "DllRegisterServer" Error When You Try to Register a DLL by Using Regsvr32.exe

Support for Windows XP has ended

Microsoft ended support for Windows XP on April 8, 2014. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

Support for Windows Server 2003 ended on July 14, 2015

Microsoft ended support for Windows Server 2003 on July 14, 2015. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

SYMPTOMS
When you try to register a dynamic-link library (or DLL, or .dll file) by using the Regsrv32.exe command-line tool, the DLL is not registered, and you may receive the following error message:
DllRegisterServer in file_name.dll failed.

Return code was: 0x80070005
NoteThis behavior does not occur in Windows NT 4.0 or Windows 2000.
CAUSE
This behavior may occur if you try to register a DLL by using Regsrv32 while you are logged on using an account that does not have administrative credentials, such as an account that is a member of the standard users group. An account that does not have administrative credentials cannot write to the registry or change files in the System32 folder.

The behavior occurs because Windows XP and Windows Server 2003 use a more restrictive security scheme than earlier versions of Windows use. This scheme prevents standard users from registering DLLs.

Note Because of this behavior, standard users may not be able to run programs that self-register DLLs by using standard user's ID.
RESOLUTION
To resolve this behavior, log on by using an administrator account, and then register the DLL.
MORE INFORMATION
You can register a DLL by using an account that does not have administrative credentials as long as the DLL does not write to the registry or change files in the System32 folder.
Properties

Article ID: 827659 - Last Review: 09/11/2011 07:26:00 - Revision: 3.0

Microsoft Windows Server 2003, Web Edition, Microsoft Windows Server 2003, Standard Edition (32-bit x86), Microsoft Windows Server 2003, Enterprise Edition (32-bit x86), Microsoft Windows Server 2003, Datacenter Edition (32-bit x86), Microsoft Windows XP Professional, Microsoft Windows XP Home Edition

  • kberrmsg kbprb KB827659
Feedback