本文介绍了Registry.LocalMachine.OpenSubK ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Visual Studio 2010中使用Visual Basic进行编程。以下代码为rk返回null
I am programming with Visual Basic in Visual Studio 2010. The following code returns null for rk
Dim SoftwareKey As String
Dim rk As RegistryKey
SoftwareKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products"
rk = Registry.LocalMachine.OpenSubKey(SoftwareKey)
但是,我知道子密钥存在是因为我在运行注册表编辑器regedit.exe时可以看到它。我做错了什么?
However, I know that the sub key exists because I can see it when I run regedit.exe, the registry editor. What am I doing wrong?
推荐答案
这篇关于Registry.LocalMachine.OpenSubK ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!