![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re: Reading subkeys from registry -- evil registry redirection?by Discipulus (Canon) |
on Nov 13, 2015 at 11:25 UTC ( #1147654=note: print w/replies, xml ) | Need Help?? |
ok gepebril69 I have not a solution as your code produces useful results for me and for others too(more about it below). But I have some suggestions. Preamble: you said special access flags to make it happen on 64bit platforms and this ringed a bell in my mind: is this monk another victim of the evil microsoft redirection? you should already know, as you are using special access flags, but to fully understand read this post from me. Filesystem redirection has two, equally evil, brothers: Registry redirection and COM object model. See what they say about Registry redirection. Now that you know you are walking on So i spoiled your code from unusefull things (delimiters, arrayvalues, the call of Dumper.. but also the dump af all keys) and i add just a little code to show if the Perl version is 64bit. Most important i removed your Access special keys (more on that below) part {Access=> 0x20019|0x0100} and used the standard flag imported from Win32API::Registry ie use Win32API::Registry qw(KEY_READ); .. Access=>KEY_READ() So the code became: With my little Perl version test program i got theese results: As the perl is 64bit the keys found are 77 on my workstation. 353 otherwise. Now i understood why you used thees special keys (described here) because KEY_WOW64_64KEY (0x0100) is not exported by Win32API::Registry. and you used it diractly in junction with KEY_READ (0x20019). using {Access=> 0x20019|0x0100} access (uncomment it in the above example and comment the Access=>KEY_READ()) give theese results: As you can see all Perls see only 77 unistallable programs. If you see zero key returned on your machine, with your original code, it means to me that you have no 64bit applications uninstallable on your system (the opposite of what i read from ms docs!! in fact in the 77 subkey i find programs that resides in the 64bit program folder "C:\Program Files").Or using other words: if you use your special access flag you are probably looking for the wrong thing. try just reading them and be aware of the possible redirection occuring when you play the three card game with that OS. HtH and let us know L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|