Subject: | Windows 7 Registry Oddities |
I'm having trouble reading the registry with this module in Windows 7.
For example, I am querying for a subkey I know is present but it always
comes back as key not found in the following snippet:
use Win32::TieRegistry;
$Win32::TieRegistry::Registry->Delimiter("/");
my
$pointer=$Win32::TieRegistry::Registry->{"LMachine/SOFTWARE/ComputerAssociates/"};
if (defined $pointer) {
print "key was found.\n";
} else {
print "key not found.\n";
}
As best I can tell, this appears to be a windows 7 security-related
issue. When I run the same snippet on Windows 2003 server, it works.
Watching in a debugger, it appears the subkeys are all null.
When I run (similar to one of your top examples on perldoc):
use Win32::TieRegistry;
$Win32::TieRegistry::Registry->Delimiter("/");
my $key= $Registry->{"HKEY_CURRENT_USER/SOFTWARE"}
or die "Can't read key: $EXTENDED_OS_ERROR\n";
it fails with the error:
Usage: Win32API::Registry::regConstant("CONST_NAME") at
C:/Perl/lib/Win32/TieRegistry.pm line 292
Any hints as to how to control registry access permissions? I am
running this as an administrator account.
Thanks,
Chris