OK, so first, I create a RegistryKey like
Then I try to create 2 values likeCode:Dim App_Paths As RegistryKey = Registry.LocalMachine.OpenSubKey _ ("SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths", True) ' & myapp.exe, True) App_Paths.CreateSubKey(myapp.exe)
Now instead of editing the "(Default)" key that is created automatically, it creates a new "(Default)" key, but I don't want that. Any help?Code:Dim CreatedKey As RegistryKey = App_Paths.OpenSubKey(filename2, True) My.Computer.Registry.SetValue(CreatedKey.ToString, "(Default)", TextBox1.Text) My.Computer.Registry.SetValue(Created.ToString, "Path", "This value is created successfully") App_Paths.Close()
EDIT:
Oops, fixed it by changing "(Default)" into "", it is solved now, am marking thread as resolved, mods trash this thread or something!


Reply With Quote