Has anyone got a working example of RegistryItem.Delete?
I’ve tried every permutation I can think of to remove a key (an empty folder, not a name:value pair) and it just does nothing while reporting no errors.
The documentation doesn’t help either.
RegistryItem.Delete ( Name as String )
Deletes the passed RegistryItem.
So it deleted the passed RegistryItem you say? I say nope.
What exactly is Name? Is that the name of the Key ? Does it need to be a full path or a sub path? Do you need a \ before it or after it?
dim tmp As New RegistryItem("HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\blah\\wibble", False)
tmp.Delete("")
Nope
dim tmp As New RegistryItem("HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\blah", False)
tmp.Delete("wibble")
The only example on the forum is here, its no use because its wrong (I know you were writing it from memory Wayne, I’m not having a go ) Name is a String, so it cant have a RegistryItem passed to it.
This is driving me crazy, something seemingly so simple, yet I’m stumped by the documentation
Thanks Greg, I got there in the end, however its not throwing that error (it would have been a lot quicker of a puzzle if it had), I’m in the middle of writing a feedback about it, I’ll try it on a previous version first though, I’m using a beta version.