in reply to Re^2: Scanning through Windows registry
in thread Scanning through Windows registry

Do you have Win32::WinError ? Bug #39818 for Win32-TieRegistry: SubKeyNames fails in German Windows XP, unless Win32::WinError is installed

Try applying this patch? Bug #37750 for Win32API-Registry: RegQueryValueEx can cause perl to crash. Patch attached

  • Comment on Re^3: Scanning through Windows registry

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

    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 seems there are work-a-rounds for the problem with 64bits registry

      What is your environment?

      I ask, because I have the 64 bit version of ActiveState Perl 5.16.2 installed on Win7 x64 and Win2012 x64 and the code I posted just works, no fixes or workarounds necessary. (and no, the 64 bit version of Windows does not have multiple registries, that would actually be insane. What it does is store entries from 32 bit apps in alternate subsections of the registry, such as the Wow6432Node folder)

        Sorry for late reply

        I use Strawberry Perl 5.20 32bits

        Windows server 2008