Microsoft.Win32
Registry.ClassesRoot 对应于HKEY_CLASSES_ROOT子目录树
Registry.CurrentUser 对应于HKEY_CURRENT_USER子目录树
Registry.LocalMachine 对应于 HKEY_LOCAL_MACHINE子目录树
Registry.User 对应于 HKEY_USER子目录树
Registry.CurrentConfig 对应于HEKY_CURRENT_CONFIG子目录树
Registry.DynDa 对应于HKEY_DYN_DATA子目录树
Registry.PerformanceData 对应于HKEY_PERFORMANCE_DATA子目录树
Dim hklm As RegistryKey = Registry.LocalMachine
Dim software11 As RegistryKey = hklm.OpenSubKey ( "SYSTEM" ) '打开"SYSTEM"子健
Dim software As RegistryKey = software11.OpenSubKey ( "A000" ) '打开"A000"子健
Dim software11 As RegistryKey = hklm.OpenSubKey ( "SYSTEM" ,true ) '打开"SYSTEM"子健
Dim software As RegistryKey = software11.OpenSubKey ( "A000" , true ) '打开"A000"子健
Dim ddd As RegistryKey = software.CreateSubKey ( "ddd" )
ddd.SetValue ( "www" , "1234" )
Dim KeyCount As integer = software.SubKeyCount '获得当前健下面有多少子健
Dim Str ( ) As String = software.GetSubKeyNames ( ) '获得当前健下面所有子健组成的字符串数组
Dim Str2 ( ) As String = sitekey.GetValueNames ( ) '获得当前子健下面所有健组成的字符串数组
Dim ValueCount As integer = sitekey.ValueCount '获得当前子健存在多少健值