Click here to Skip to main content
15,882,055 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Does anyone know how to go about navigating the Windows registry when you need to walk the tree? How can I find the children of a node(key)?

I have this example in C. I have the WScript.Shell's RegRead method. I am not sure how to proceed.

My eventual target is to delete an entire subtree of the registry. I found that RegDelete throws an exception if the tree is not empty when I give a key path ending in a slash. So, I think I need to do a depth-first traversal and delete as I unwind.
Posted

VB
Set WshShell = WScript.CreateObject("WScript.Shell")
mykey = "HKEY_LOCAL_MACHINE\SOFTWARE\mykey\"
WshShell.RegDelete mykey 

The trailing \ will delete entry with all child nodes.

Or check this. http://www.tek-tips.com/viewthread.cfm?qid=674375[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900