gepebril69 has asked for the wisdom of the Perl Monks concerning the following question:
hi there
I'm trying to get all the subkeys from the following Windows registry key: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall
I do this to retrieve all installed software on my local Windows machine. I have used, similar code in the past to retrieve subkeys. I had to use Win32::TieRegistry with special access flags to make it happen on 64bit platforms
use Win32::TieRegistry( Delimiter=>"#", ArrayValues=>0 ); my $pound = $Registry->Delimiter("/"); $BaseKey = $Registry->Open("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Wind +ows/CurrentVersion/Uninstall", {Access=> 0x20019|0x0100}); print $BaseKey."\n"; print Dumper keys %$BaseKey; print "Number of subkeys found: ".scalar(keys %$BaseKey); foreach $Key (keys %$BaseKey) { print $Key."\n"; }
Output:
Win32::TieRegistry=HASH(0x4eaa84) Number of subkeys found: 0
What am I doing wrong? Or is it something else?
|
|---|