[RESOLVED] Why can't I create this registry value?
OK, so first, I create a RegistryKey like
Code:
Dim App_Paths As RegistryKey = Registry.LocalMachine.OpenSubKey _
("SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths", True) ' & myapp.exe, True)
App_Paths.CreateSubKey(myapp.exe)
Then I try to create 2 values like
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()
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?
EDIT:
Oops, fixed it by changing "(Default)" into "", it is solved now, am marking thread as resolved, mods trash this thread or something!