是否可以从HKLM \ SYSTEM \ ControlSet00x \ Enum中删除键和数据? [英] Is it possible to delete keys and data from HKLM\SYSTEM\ControlSet00x\Enum ?

查看:86
本文介绍了是否可以从HKLM \ SYSTEM \ ControlSet00x \ Enum中删除键和数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

特别是,我想删除所有已被删除的COMn端口的痕迹
已卸载,因此当我的软件调用EnumPorts时,它将返回一个列表.
仅当前已实现的那些串行端口.

我尝试过的:

Regedt32,以管理员身份运行.我无法删除,重命名或更改任何内容
在这个部分.典型错误消息:无法删除< key_name> ;:
时出错 删除密钥.

我使用RegDelNull进行扫描,但在字符串中未找到任何null.

我将相关部分导出为.REG文件,并根据
对其进行了修改 指示,并尝试合并修改后的文件.错误消息
包括句子某些键已由系统或其他进程打开".

因此,也许系统始终会打开Enum键.
这是MSDN关于HKEY_LOCAL_MACHINE的评价:

...它包含保存当前配置数据的子项,包括Plug
和播放信息(Enum分支,其中包含
的完整列表 系统上曾经使用过的所有硬件
),网络登录首选项,...

那么有没有办法删除这些东西?我不认为我可以成为唯一的

In particular, I want to delete all traces of COMn ports that have been
uninstalled, so when my software calls EnumPorts, it will return a list
of only those serial ports that are currently implemented.

What I have tried:

Regedt32, run as Administrator. I can''t delete, rename, or change anything
in this section. Typical error message: Cannot delete <key_name>: Error while
deleting key.

I scanned with RegDelNull, and it did not find any nulls in the strings.

I exported the relevant section as a .REG file, modified it according to
directions, and attempted to MERGE the modified file. The error message
included the sentence "Some keys are open by the system or other processes".

So maybe the system always has the Enum keys open.
Here is what MSDN has to say about HKEY_LOCAL_MACHINE:

...It contains subkeys that hold current configuration data, including Plug
and Play information (the Enum branch, which includes a complete list of
all hardware that has ever been on the system
), network logon preferences,...

So is there a way to delete this stuff? I don''t think I can be the only
person in the world who ever wanted to do this.

推荐答案

在更高版本的Windows中,某些注册表受到保护.您需要为用户分配权限才能删除它.

以下文章介绍了如何执行此操作:

http://www.raymond.cc/blog /full-control-permission-to-delete-or-edit-restricted-windows-registry/ [
In later versions of Windows some of the registry is protected. You need to assign permissions to your user to be able to delete it.

The follow article describes how to do this:

http://www.raymond.cc/blog/full-control-permission-to-delete-or-edit-restricted-windows-registry/[^]


如果我是你,我会带一种不同的方法.我一直在使用USB COM端口设备,当我插入它们时,其中一些会记住上次插入时为其分配的端口号-这对我来说通常非常有用.

而不是使用EnumPorts,请尝试查看PJ Naughter的解决方案.他在CP上的文章有些过时,因此您应该阅读他在其网站上的最新文章(但如果愿意,可以使用他的CP解决方案).
EnumSerialPorts v1.02-枚举串行端口 [ http://www.naughter.com/enumser.html [
If I was you I would take a different approach to this. I use USB COM port devices all the time and when I plug them in, some of them remember the port number they were assigned the last time they were plugged in - this is often very useful to me.

Instead of using EnumPorts try looking at PJ Naughter''s solution. His article here on CP is a little dated, so you should go with the latest he has on his website (but upvote his CP solution if you like it).
EnumSerialPorts v1.02 - Enumerating Serial Ports[^]
http://www.naughter.com/enumser.html[^]

Soren Madsen


这篇关于是否可以从HKLM \ SYSTEM \ ControlSet00x \ Enum中删除键和数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆