大网数据广告活动
启动与系统组件

Fail to register a DLL by using Regsvr32.exe

· 52CE 我爱测

Provides a solution to a 0x80070005 error that occurs when you register a DLL by using Regsvr32.exe.

This article provides a solution to a 0x80070005 error that occurs when you register a DLL by using Regsvr32.exe.

Original KB number:   827659

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

Note: This 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.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Client · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。