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.
Locked
User avatar
tonilocoyote
Posts: 1
Joined: Tue Oct 06, 2009 9:10 pm

Iterate Registry with RegistryAccess object

Post by tonilocoyote » Tue Oct 06, 2009 9:10 pm

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
Joined: Thu Aug 18, 2011 4:56 am

Iterate Registry with RegistryAccess object

Post by davidc » Wed Oct 07, 2009 1:14 am

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: 7151
Joined: Tue May 29, 2007 4:43 pm

Iterate Registry with RegistryAccess object

Post by Alexander Riedel » Wed Oct 07, 2009 1:16 am

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.

Locked