Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Scanning through Windows registry

by gepebril69 (Scribe)
on Jan 09, 2015 at 19:22 UTC ( [id://1112793]=note: print w/replies, xml ) Need Help??


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

@Simon,

Thanks, running this, results in:

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

Replies are listed 'Best First'.
Re^3: Scanning through Windows registry
by Anonymous Monk on Jan 09, 2015 at 22:50 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)

Re^3: Scanning through Windows registry
by gepebril69 (Scribe) on Jan 09, 2015 at 19:31 UTC

    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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1112793]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-19 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found