in reply to Scanning through Windows registry

I'll just leave this here...

use 5.16.2; use Win32::TieRegistry; my $baseKey = $Registry->{'HKEY_CLASSES_ROOT\Installer\Patches'}; foreach my $subKey ( $baseKey->SubKeyNames ) { say $subKey; }

Replies are listed 'Best First'.
Re^2: Scanning through Windows registry
by gepebril69 (Scribe) on Jan 09, 2015 at 19:22 UTC

    @Simon,

    Thanks, running this, results in:

    Can't call method "SubKeyNames" on an undefined value at E:\test4.pl line 4. :(

        Thanks for extra info

        It seems there are work-a-rounds for the problem with 64bits registry, it is located here it lies in access rights

        I managed to create a scrip to retrieve all subkeys, it's this

        use Win32::TieRegistry( Delimiter=>"#", ArrayValues=>0 ); my $pound = $Registry->Delimiter("/"); # This syntax passes the HEX flag to access the 64 bit registry $BaseKey = $Registry->Open("HKEY_CLASSES_ROOT/Installer/Patches", {Acc +ess=> 0x20019|0x0100}); foreach $key (keys %$BaseKey) { print"$key: " . $BaseKey->{"$key"} . "\n" }

        update

        Found a way to retrieve all the PackageName value from: HKEY_CLASSES_ROOT/Installer/Patches/XXXXXXX/SourceList
        Where XXXXXX = $key from example above

        $SubbyKey = $Registry->Open("HKEY_CLASSES_ROOT/Installer/Patches/".$ke +y."SourceList/", {Access=> 0x20019|0x0100}); print $SubbyKey->{'PackageName'}."\n";

      It's like no path or key exists with TieRegistery

      I have the same issue as here: http://stackoverflow.com/questions/678015/why-cant-win32tieregistry-list-subkeys

      That is why I gave up on TieRegistry