Jump to content
Sign in to follow this  

[SOLVED] How to get all values inside a registry key?

Recommended Posts

Hello guys, i need a way to get all values that are under a specific registry key, for example all values under


I know I can use RegRead ( "keyname", "valuename" ) by specifying the "valuename" but i want to get all these valuenames under the specific "keyname" in this case under Run

Is there something im missing?? I can't figure out any simple way....

thanks for any help...

Edited by ALTIN

Share this post

Link to post
Share on other sites

this is not going to answser you question entirely, but i did something simalar once to find all the installed instaces of SQL like this

$instanceName = "MSSQLSERVER"
$x = 0
     $x += 1
     $instances = RegEnumVal("HKLM\SOFTWARE\Microsoft SQL Server\Instance Names\SQL", $x)
Until @error <> 0 Or $instances = $instanceName

so, i know it doesn't do exactly what you need, but you can mold it into what you do need it to do. it does read all the values in a key, so you could do like

FileWriteLine($hFile, $instances)

for each $value. Good luck. hopefully it helps.

Share this post

Link to post
Share on other sites

Hey @redLabel & @UEZ, thanks so much, with your help I got what i was missing: RegEnumVal() is what i needed and actually does the job.

Here is what I have now and that is the solution:

For $i = 1 to 100
$var = RegEnumVal("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $i)

if @error <> 0 Then ContinueLoop
MsgBox(4096, $var, RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $var))


Edited by ALTIN

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...