如何删除此注册表项 [英] How to delete this register key
本文介绍了如何删除此注册表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试删除此密钥,但是如何。
这是我读密码的方法,如何删除它?
I am trying to delete this key but how .
This is how i read the key , how to delete this ?
Dim readValue As String
readValue = My.Computer.Registry.GetValue _
("HKEY_CURRENT_USER\Software\VB and VBA Program Settings\TestKey", "TestValue", Nothing)
Label1.Text = readValue
这不起作用。
this is not working.
Try
Dim key As Microsoft.Win32.RegistryKey
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\VB and VBA Program Settings\TestKey", True)
key.DeleteValue("TestValue")
Catch ex As Exception
End Try
推荐答案
尝试使用DeleteSubKey
方法。
Hi,
try by using "DeleteSubKey
" method.
key.DeleteSubKey("TestValue")
请参阅 RegistryKey.DeleteSubKey方法 [ ^ ]
希望它有所帮助。
refer RegistryKey.DeleteSubKey Method [^]
hope it helps.
使用DeleteSubKey [ ^ ]。请检查: http://geekswithblogs.net/BruceEitman/ archive / 2009/07/26 / c - 删除-a-registry-key.aspx [ ^ ](例如c#,但在vb.net中也很明显)
Use DeleteSubKey[^]. Check this: http://geekswithblogs.net/BruceEitman/archive/2009/07/26/c--deleting-a-registry-key.aspx[^] (example is c#, but quite obvious in vb.net too)
这篇关于如何删除此注册表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文