获取注册表中某个目录的键
如何获取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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
注册表中没有目录。注册表包含键和值。这些值具有名称和数据。不过,这些键就像目录。
如果您想检查密钥的内容,可以使用
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 itsRootKey
property toHKey_Current_User
, and use itsOpenKeyReadOnly
method to open the subkey. Then you can use the variousRead
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 or
GetDataInfo` 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.