I have a perl function that takes an open registry key object. Now, I want to get the name of the key this object represents. How do I get the key Name?
I am using Win32::Registry module.
I have a perl function that takes an open registry key object. Now, I want to get the name of the key this object represents. How do I get the key Name?
I am using Win32::Registry module.
According to this documentation you do it like this:
my @keys;
$reg_obj->GetKeys(\@keys);
Populates the supplied array reference with the names of all the keys within the registry object $reg_obj
.
But they also say: obsolete, use Win32::TieRegistry
Browsing through the source, it doesn't look like Win32::Registry will let you take the handle and get back to the Key. I see three ways around this:
Open
and the path to them yourself.