扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:符志强 来源:微软社区 2007年11月9日
关键字:
Dim hklm As RegistryKey = Registry.LocalMachine '打开"SYSTEM"子健 Dim software11 As RegistryKey = hklm.OpenSubKey ( "SYSTEM" ,true ) '打开"A000"子健 Dim software As RegistryKey = software11.OpenSubKey ( "A000" , true ) software.DeleteSubKeyTree ( "ddd" ) |
Dim hklm As RegistryKey = Registry.LocalMachine '打开"SYSTEM"子健 Dim software11 As RegistryKey = hklm.OpenSubKey ( "SYSTEM" ,true ) '打开"A000"子健 Dim software As RegistryKey = software11.OpenSubKey ( "A000" , true ) Dim ddd As RegistryKey = software.OpenSubKey ( "ddd" , true ) ddd.DeleteValue( "www" ) |
Private Sub Button1_Click ( ByVal sender As System.Object , ByVal e As System.EventArgs ) _ Handles Button1.Click listBox1.Items.Clear ( ) Dim hklm As RegistryKey = Registry.LocalMachine Dim software11 As RegistryKey = hklm.OpenSubKey ( "SYSTEM" ) '打开"SYSTEM"子健 Dim software As RegistryKey = software11.OpenSubKey ( "A000" ) '打开"A000"子健 Dim KeyCount As integer = software.SubKeyCount '获得当前健下面有多少子健 Dim Str ( ) As String = software.GetSubKeyNames ( ) '获得当前健下面所有子健组成的字符串数组 Dim i As integer For i = 0 to KeyCount - 1 listBox1.Items.Add ( Str ( i ) ) Dim sitekey As RegistryKey = software.OpenSubKey ( Str ( i ) ) '按顺序打开子健 Dim Str2 ( ) As String = sitekey.GetValueNames ( ) '获得当前子健下面所有健组成的字符串数组 Dim ValueCount As integer = sitekey.ValueCount '获得当前子健存在多少健值 Dim j As integer For j = 0 to ValueCount - 1 listBox1.Items.Add ( " " + Str2 ( j ) + ": " + sitekey.GetValue ( Str2 ( j ) ) ) '在列表中加入所有子健、健和健值 Next j Next i End Sub '删除子健 Private Sub Button2_Click ( ByVal sender As System.Object , ByVal e As System.EventArgs ) _ Handles Button2.Click listBox1.Items.Clear ( ) Dim hklm As RegistryKey = Registry.LocalMachine '打开"SYSTEM"子健 Dim software11 As RegistryKey = hklm.OpenSubKey ( "SYSTEM" ,true ) '打开"A000"子健 Dim software As RegistryKey = software11.OpenSubKey ( "A000" , true ) software.DeleteSubKeyTree ( "ddd" ) End Sub '删除指定的健 Private Sub Button3_Click ( ByVal sender As System.Object , ByVal e As System.EventArgs ) _ Handles Button3.Click listBox1.Items.Clear ( ) Dim hklm As RegistryKey = Registry.LocalMachine '打开"SYSTEM"子健 Dim software11 As RegistryKey = hklm.OpenSubKey ( "SYSTEM" ,true ) '打开"A000"子健 Dim software As RegistryKey = software11.OpenSubKey ( "A000" , true ) Dim ddd As RegistryKey = software.OpenSubKey ( "ddd" , true ) ddd.DeleteValue( "www" ) End Sub End Class Module Module1 Sub Main ( ) Application.Run ( New Form1 ( ) ) End Sub End Module |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者