How to get all the value in a registry key 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?


    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:

    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()
    End Using
    Also put this in the top of your code file:

    Imports Microsoft.Win32


    • 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

    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.
    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
  • To create a key just put the name of the key and it'll be created .

    Friday, February 4, 2022 5:31 AM
  • nice
    Saturday, February 5, 2022 7:55 AM
  • use this Format to Read 64-Bit Registry values :

    Dim rk1 As RegistryKey
    Dim rk2 As RegistryKey
    rk1 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64)
    rk2 = rk1.OpenSubKey("HARDWARE\DESCRIPTION\System\BIOS")
    Dim PID As String = rk2.GetValue("SystemProductName").ToString
    Tuesday, February 8, 2022 2:10 PM
  • Great , It worked....
    Saturday, February 19, 2022 5:04 AM
  • How can read and write registry value in VB net?
    Friday, March 11, 2022 11:43 AM