http://www.perlmonks.org?node_id=858271


in reply to Re^2: Unable to delete registry keys using Win32::TieRegistry ('/')
in thread Unable to delete registry keys using Win32::TieRegistry

Thanks for your answer.  I was kind of hoping you might comment here, since it appears you wrote the original module, and it's nice to get advice directly from the expert.

I don't think I was missing a trailing '/' in my original code, but now I'm not sure; it's certainly possible.  I'll have to go back and check tomorrow.  

Since I have your ear, (more accurately "eyes"), is there any easy way to delete a whole subkey, which may or may not have subkeys or subvalues?  From what I've read of the documentation there's no way to do so, (and I've already written code that seems to work for this), but it seems like a potentially useful option.

It's a very useful module!  I've got some ideas for things I'd like to add to the Windows context menu, and this seems just the I need to automate it. :-)


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
  • Comment on Re^3: Unable to delete registry keys using Win32::TieRegistry ('/')

Replies are listed 'Best First'.
Re^4: Unable to delete registry keys using Win32::TieRegistry (recursive delete)
by tye (Sage) on Sep 01, 2010 at 04:04 UTC
    [...] is there any easy way to delete a whole subkey, which may or may not have subkeys or subvalues?

    My answer at Re: Removing keys in the registry (code) has not lost what accuracy it started out with so I'll just stop with the link to it.

    - tye