[Help] Registry Getting all values in a subkey[Solved]

Posts 1–8 of 8 · Page 1 of 1
[Help] Registry Getting all values in a subkey[Solved]
tittle is clear , how could i get all values in a registry sub key
i googled but nothing helped
Quote Originally Posted by mnpeepno2 View Post
you dont.


remember to press the thanks butten!
Why wouldn't you be able 2 do so? Lol.

Take a look at microsoft.win32.registrykey.
Quote Originally Posted by Blubb1337 View Post
Why wouldn't you be able 2 do so? Lol.

Take a look at microsoft.win32.registrykey.
i already looked , GetValues and other methods of get don't work they just return nothing
Quote Originally Posted by T0P-CENT View Post
i already looked , GetValues and other methods of get don't work they just return nothing
[highlight="VB"]
Dim regkey As RegistryKey

regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microso ft\Cryptography")
dim guid as string = CStr(regkey.GetValue("MachineGuid"))
regkey.Close()[/highlight]
Quote Originally Posted by Blubb1337 View Post
[highlight="VB"]
Dim regkey As RegistryKey

regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microso ft\Cryptography")
dim guid as string = CStr(regkey.GetValue("MachineGuid"))
regkey.Close()[/highlight]
well that gets a value of specified key
i want all values/keys
Quote Originally Posted by freedompeace View Post
Each key is only linked to one value. You can seialise many variables into one value inside your program first, however.
"Each key is only linked to one value" i know that
that other part didn't get it prefectly
Quote Originally Posted by T0P-CENT View Post
well that gets a value of specified key
i want all values/keys
Each key is only linked to one value. You can seialise many variables into one value inside your program first, however.
[highlight=vbnet]Dim keyName As String = "SOFTWARE\Microsoft\Cryptography"
Dim subkeyNames() As String
Dim valueNames() As String
valueNames = Registry.LocalMachine.OpenSubKey(keyName).GetValue Names
subkeyNames = Registry.LocalMachine.OpenSubKey(keyName).GetSubKe yNames

For Each value In valueNames
MsgBox(value & " - " & Registry.LocalMachine.OpenSubKey(keyName).GetValue (value)) 'Gets all keys in the specified subKey
Next

For Each subKey In subkeyNames
MsgBox(subKey) 'Gets the names of all other subkeys in the specified subkey
Next[/highlight]

Quote Originally Posted by master131 View Post
[highlight=vbnet]Dim keyName As String = "SOFTWARE\Microsoft\Cryptography"
Dim subkeyNames() As String
Dim valueNames() As String
valueNames = Registry.LocalMachine.OpenSubKey(keyName).GetValue Names
subkeyNames = Registry.LocalMachine.OpenSubKey(keyName).GetSubKe yNames

For Each value In valueNames
MsgBox(value & " - " & Registry.LocalMachine.OpenSubKey(keyName).GetValue (value)) 'Gets all keys in the specified subKey
Next

For Each subKey In subkeyNames
MsgBox(subKey) 'Gets the names of all other subkeys in the specified subkey
Next[/highlight]

solved , thanks much master
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us