speedy6 Posted October 17, 2007 Share 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 Link to comment Share on other sites More sharing options...
DjDeep00 Posted October 17, 2007 Share Posted October 17, 2007 Search the help file for RegEnumKey. Link to comment Share on other sites More sharing options...
speedy6 Posted October 17, 2007 Author Share 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... Link to comment Share on other sites More sharing options...
DjDeep00 Posted October 18, 2007 Share 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. Link to comment Share on other sites More sharing options...
Tiger Posted October 18, 2007 Share Posted October 18, 2007 Use this:_RegEnumKey My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
weaponx Posted October 18, 2007 Share 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") Link to comment Share on other sites More sharing options...
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