如何删除此注册表项

编程入门 行业动态 更新时间:2024-10-27 02:27:38
本文介绍了如何删除此注册表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试删除此密钥,但是如何。 这是我读密码的方法,如何删除它?

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 [ ^ ]。请检查: geekswithblogs/BruceEitman/ archive / 2009/07/26 / c - 删除-a-registry-key.aspx [ ^ ](例如c#,但在vb中也很明显) Use DeleteSubKey[^]. Check this: geekswithblogs/BruceEitman/archive/2009/07/26/c--deleting-a-registry-key.aspx[^] (example is c#, but quite obvious in vb too)

更多推荐

如何删除此注册表项

本文发布于:2023-11-03 14:34:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555375.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:注册表

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!