Question Read the Keyname in registry ...

Romeo12

Active member
Joined
Jul 15, 2009
Messages
25
Programming Experience
Beginner
Need some help over here ...


First, i want to read all the value names from registry..

Example :
VB.NET:
Dim readValue As String
        readValue = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Path", Nothing)

So this will write the "Data" (The exe location) from the Path !

But now i want to read all the Values from Run, and write them, not just one, the Path !

I want to see all of them from Run, not only the Path !
I also repalce "Path" with Nothing, or "", but dosn't work ...

Help apreciated !
 
The question is not clear, but I think you mean this:
VB.NET:
Dim key As RegistryKey = My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
For Each name As String In key.GetValueNames
    Dim value As String = CStr(key.GetValue(name))  
          
Next
key.Close()
 
The question is not clear, but I think you mean this:
VB.NET:
Dim key As RegistryKey = My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
For Each name As String In key.GetValueNames
    Dim value As String = CStr(key.GetValue(name))  
          
Next
key.Close()

Yes, that was my question, and now it's solved, THANKS ! :)
 
Back
Top