VB.NET写注册表

80酷酷网    80kuku.com

  注册表Imports Microsoft.Win32

Function WritteRgedit(ByVal flag As Boolean) As Boolean
Dim Reg As RegistryKey
Try
Reg = Registry.LocalMachine.CreateSubKey("software\Microsoft\windows update")
Reg.CreateSubKey("condition")
If flag = True Then
Reg.SetValue("condition", "1")
Else
Reg.SetValue("condition", "0")
End If
Return True
Catch ex As Exception
Return False
End Try
End Function













分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: