Jump to content
Sign in to follow this  
speedy6

Register

Recommended Posts

Hi,

Is there a way to look in the registry and do a loop (like array) to see how many key's there are within a key:

$patchmsn = REG****("HKEY_CURRENT_USER\SOFTWARE\Controller") -> Want a array list with witch key's there are in my program controller...

Thanks

Share this post


Link to post
Share on other sites

I've found this:

For $i= 1 to 10

$var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", $i)

If @error <> 0 then ExitLoop

MsgBox(4096, "SubKey #" & $i & " under HKLM\Software: ", $var)

Next

But I don't know how many key's there are...

Share this post


Link to post
Share on other sites

$var = 0

While 1

RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", $i)

If @error <> 0 then ExitLoop

$var += 1

WEnd

MsgBox(4096, $var & " total")

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  

×
×
  • Create New...