Use this for saving a value
My.Computer.Registry.LocalMachine.SetValue("MyName", "MyValue")
Us this for getting a value
Dim RegistryCheck As String = My.Computer.Registry.LocalMachine.GetValue("Study")
Question
I tried edit registry using VB.net . I watched one YouTube tut.However I tried to do something and it didn't work at all :
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Try
Dim Registry As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim Key As Microsoft.Win32.RegistryKey = Registry.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
MsgBox(Key.GetValue("AmIcoSinglun64").ToString)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Unfortunately I got error : Null Pointer Exception
No correct solution
OTHER TIPS
Use this for saving a value
My.Computer.Registry.LocalMachine.SetValue("MyName", "MyValue")
Us this for getting a value
Dim RegistryCheck As String = My.Computer.Registry.LocalMachine.GetValue("Study")