[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
Originally Posted by mnpeepno2
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.
Originally Posted by Blubb1337
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
Originally Posted by T0P-CENT
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]
Originally Posted by Blubb1337
[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
Originally Posted by freedompeace
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
Originally Posted by T0P-CENT
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]
Originally Posted by master131
[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]