Iterate Registry with RegistryAccess object

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
This topic is 14 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
tonilocoyote
Posts: 1
Last visit: Tue Oct 06, 2009 9:56 pm

Iterate Registry with RegistryAccess object

Post by tonilocoyote »

What is the best way for iterating through the registry with RegistryAccess object?

It will be appreciated an example for deleting entire key branches due RegistryAccess can't do it if the key has one or more child subkeys.

I know I must use recursive function calls, etc., but, what is the best way? Whether opening each subkey by creating a new RegistryAccess object for each iteration, or by using GetSubKey() for each one, or even by moving the same object downward the tree with GotoSubKey() and then upward with GotoParentKey()?

I suppose that by means of one of the above procedures I must fill a flat array of strings with the full name of every branch in order of using each of these strings to call DeleteKey() in a final pass and in inverted order.

What is the way of doing that with the best performance and less time/memory overhead?

Thank you.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Iterate Registry with RegistryAccess object

Post by davidc »

I recommend posting this question on http://www.ScriptingAnswers.com.
This board is reserved for questions about our free tools.

Thank you,

David
David
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Iterate Registry with RegistryAccess object

Post by Alexander Riedel »

That is a good question actually. We will make that a subject of a blog post soon, so keep an eye on www.sapien.com/blog

Alex
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 14 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.