Codes:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim regKey As Microsoft.Win32.RegistryKey
Dim KeyName As String = "Test"
Dim KeyValue As String = "C:\test\test.exe"
regKey=Microsoft.Win32.Registry.LocalMachine.Op
If regKey.GetValue(KeyName) = Nothing Then
MsgBox("No value found")
regKey.SetValue(KeyName, KeyValue, Microsoft.Win32.RegistryValueKind.String
MsgBox("keyValue " & KeyName & " has been created")
Else
MsgBox("This Program already exists", vbInformation, "Information")
End If
End Sub
End Class
_________________________________________________________________________
Here is the video tutorial:
No comments:
Post a Comment