Subject: | Open() returns NULL for keys with no subkeys and only default values |
The second print should output the HASH value, right? Is this a bug or
an intentional feature of TieRegistry? I recursed my entire registry on
Windows XP Home SP2, and there were about 50 keys that produced this
behavior. Everything else (thousands?) worked fine. HKLK\SAM\SAM is
the first one that causes it in a breadth-first search over the entire
registry. Thanks for any input!
--
Kristian Hermansen
Subject: | open_bug.pl |
#!/usr/bin/perl -w
use warnings;
use strict;
BEGIN{
exit(1) unless($^O =~ /win/i);
use Win32::TieRegistry (Delimiter=>"/");
}
my $HKLM = Win32::TieRegistry->new("LMachine"); # HKEY_LOCAL_MACHINE
print "HKLM\\SAM: " . $HKLM->Open("SAM") , "\n";
print "HKLM\\SAM\\SAM: " . $HKLM->Open("SAM/SAM") . "\n";