大网数据广告活动
性能与资源

Error while deleting key

· 52CE 我爱测

When you try to remove a registry key, you receive the Error while deleting key error message. Provides a resolution.

This article provides a resolution to solve the Error while deleting key error that occurs when trying to remove certain registry keys.

Original KB number:   2021860

Symptoms

You may get the following error message when trying to delete a registry key:

Error while deleting key

Cause

This issue can be caused if you attempt to delete a registry key that contains embedded null characters. These characters aren't visible when viewing the registry entry.

Resolution

To delete a registry key that contains an embedded null character, you must first replace the null character with another character. You can accomplish this operation by using the RegDelNull v1.11 tool from Sysinternals.

More information

Usage: regdelnull <path> [-s]
-s Recurse into subkeys.

You can't manually create a registry entry with an embedded null character. This issue usually occurs because of a corrupt application installation or similar. Windows kernel may embed a NULL character in a string to form a complete key name. If this entry is accessed from user-mode, it's not possible to open the key containing the embedded null string.

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 Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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