speedy6 Posted October 17, 2007 Posted October 17, 2007 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
speedy6 Posted October 17, 2007 Author Posted October 17, 2007 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...
DjDeep00 Posted October 18, 2007 Posted October 18, 2007 Make it goto any large number like 1000. Dont worry you wont get any errors because of the If @error <> 0 then ExitLoop.
weaponx Posted October 18, 2007 Posted October 18, 2007 $var = 0 While 1 RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", $i) If @error <> 0 then ExitLoop $var += 1 WEnd MsgBox(4096, $var & " total")
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now