Archive: Recursive DeleteRegKey?


Hi,

Just wondering if there is a way to make the DeleteRegKey command delete the specified key and everything underneath it. I'm using 1.2 beta and it seems it only deletes a key if it has no "children" keys.

Perhaps I'm missing something?

Thanks in advance...


Such a function is dangerous!
If you were to use such a function, it can have very dangerous side-effects... Imagine using it on HKEY_LOCAL_MACHINE\Software... You'd wipe out almost the entire registry. I'm not sure if you'd want such a function.


Seriously.
I can just imagine it: "NSIS, a new breed of computer virus."
Don't want that. :D

- Jarsonic


Ok I didn't think of the potential for havoc. Thanks for pointing it out.

I'm was just being lazy with a bunch of keys that store component positions in a Delphi app. Got round it by deleting the appropriately keys from the bottom of the tree up.