获取注册表中某个目录的键

发布于 2024-09-06 18:42:46 字数 138 浏览 2 评论 0原文

如何获取Windows XP注册表中特定目录的键值?

我正在使用 Delphi

HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags

How to get the key of a especific directory in the registry of windows XP?

I'm using Delphi

HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

抠脚大汉 2024-09-13 18:42:46

注册表中没有目录。注册表包含。这些值具有名称数据。不过,这些键就像目录。

如果您想检查密钥的内容,可以使用 TRegistry 类。将其 RootKey 属性设置为 HKey_Current_User,并使用其 OpenKeyReadOnly 方法打开子项。然后您可以使用各种Read方法来读取任何值的数据。

如果您不确定数据条目的类型,可以使用 GetDataType 或GetDataInfo` 方法。

要读取所有数据条目名称的列表,您可以使用GetValueNames

所有这些都记录在帮助中,现在您知道了它们的名称,应该更容易找到许多示例。

There are no directories in the registry. The registry contains keys and values. The values have names and data. The keys are like directories, though.

If you want to inspect the contents of a key, you can use the TRegistry class. Set its RootKey property to HKey_Current_User, and use its OpenKeyReadOnly method to open the subkey. Then you can use the various Read methods to read the data of any value.

If you're not sure what the type is of a data entry, you can use the GetDataType orGetDataInfo` methods.

To read a list of all the data entries' names, you can use GetValueNames.

All of those are documented in the help, and now that you know their names, it should be easier for you to find many examples.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文