none
How to get all the value in a registry key VB.net RRS feed

All replies

  • Hello, how can i get All the value in a registry key?
    Friday, February 26, 2021 6:45 AM
  • Visual Basic .NET

    Hello, how can i get All the value in a registry key?

    Thanks


    Friday, February 26, 2021 6:45 AM
  • Good day ?!?

    The name of this forum is: "Forums Issues (not product support)".

    It explicitly tell you that this forum is NOT for production support!
    This forum is for issues in the forums' system.

    Please close this thread by marking the best answer/response and ask again the right forum, which is the "dotnet-visual-basic" forum in the link bellow:

    https://docs.microsoft.com/en-us/answers/topics/dotnet-visual-basic.html

    Have a great day and stay safe


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Friday, February 26, 2021 4:14 PM
  • According to me, you cannot modify that key without admin rights for security reasons.
    There is no way to get round that!
    • Proposed as answer by Roy Kaushik Wednesday, March 10, 2021 6:15 AM
    • Unproposed as answer by Roy Kaushik Wednesday, March 10, 2021 6:15 AM
    Thursday, March 4, 2021 6:44 AM
  • Try this:

    You can use Registry.LocalMachine and its OpenSubKey() method in order to open the registry key for reading. Then just call GetSubKeyNames() on that to retrieve all the names of its sub keys:

    Using FontKey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts")
        For Each SubKey As String In FontKey.GetSubKeyNames()
            ListBox1.Items.Add(SubKey)
        Next
    End Using
    Also put this in the top of your code file:

    Imports Microsoft.Win32

    Regards,
    Bruce

    • Proposed as answer by justinw812 Monday, April 12, 2021 4:02 PM
    • Unproposed as answer by justinw812 Monday, April 12, 2021 4:03 PM
    • Proposed as answer by intuit QuickBooks Thursday, May 20, 2021 12:27 PM
    Wednesday, March 10, 2021 11:59 AM
  • all you need check this guildline 

    https://stackoverflow.com/questions/47746129/getting-registry-key-value-in-vb-net-where-key-name-has-spaces

    Saturday, April 17, 2021 3:58 AM
  • Hey,

    Use the GetValue method (specifying path and name) to read a value from a registry key. The following example reads the Name value from HKEY_CURRENT_USER\Software\MyApp and displays it in a message box.
    VBCopy
    Dim readValue = My.Computer.Registry.GetValue(
        "HKEY_CURRENT_USER\Software\MyApp", "Name", Nothing)
    MsgBox("The value is " & readValue)

    This code sample is also available as an IntelliSense code fragment. It is located in the code snippet selection under Windows Operating System > Registry.

    Tuesday, May 4, 2021 1:01 PM
  • Hi, according to my research- To see if a value is present in a registry key.

    The GetValue method can be used to decide if a value exists in a registry key. The code below checks for the existence of the value and returns a response if it does not.

    If My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\TestApp",
    "TestValue", Nothing) Is Nothing Then
        MsgBox("Value does not exist.")
    End If

    Thank you hope my answer help you!

    Tuesday, May 11, 2021 4:15 AM
  • Probably you cannot modify the key. You require admin permissions for modifying. 
    Tuesday, May 11, 2021 6:23 AM
  • tans info
    Tuesday, May 11, 2021 7:45 AM