Results 1 to 1 of 1

Thread: [RESOLVED] Why can't I create this registry value?

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2010
    Posts
    131

    Resolved [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!
    Last edited by Legjendat; Dec 11th, 2010 at 05:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width