删除子项中的子项(注册表)

时间:2018-02-12 13:32:49

标签: vb.net visual-studio-2012

我想删除此注册表项:

enter image description here

我尝试了很多代码,但没有任何效果,有人知道如何删除这些代码?我也试过DeleteSubKeyTree ..没有任何效果。

我试过了:

Try Dim x As Microsoft.Win32.RegistryKey x =
  Microsoft.Win32.Registry.localmachine.OpenSubKey("HKEY_LOCAL_MACHINE\Software\VB", True) 
  x.DeleteSubKeyTree("Test") 
catch ex as exception 
    messagebox.show ex.tostring() 
end try

但是我收到的错误或异常说:

  

子项不存在

我想删除" MyTestKey"在图片及其子键.. ..

0 个答案:

没有答案