Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Reading subkeys from registry -- evil registry redirection?

by Discipulus (Canon)
on Nov 16, 2015 at 08:45 UTC ( [id://1147787]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Reading subkeys from registry -- evil registry redirection?
in thread Reading subkeys from registry

what do you mean with The used flags have little different background?

Also note that Here I didn't get undef values, but empty results is not so true: if you put null values as hashref's keys and then you look for the number of keys, ie zero.

If your last sentence is a question, yes i'm using strwaberryperl.

As you understand the redirection, testing on 2008 OS you'll see that Perl 64bit always see it's own part of the registry (18 keys in this example) while 32Bit Perl see the 32bit part with KEY_READ() and the 64bit using the special flag 0x20019|0x0100. Thus confirm that official docs are wrong. See below:
###64bit Perl Perl MSWin32-x64-multi-thread access: 0x20019|0x0100 Number of subkeys found: 18 Perl MSWin32-x64-multi-thread access: KEY_READ() Number of subkeys found: 18 ###32bit Perl Perl MSWin32-x86-multi-thread access: 0x20019|0x0100 Number of subkeys found: 18 Perl MSWin32-x86-multi-thread access: KEY_READ() Number of subkeys found: 21

HtH
L*
UPDATE: i was wrong (thanks Corion!) the docs are right:
KEY_WOW64_32KEY (0x0200) Indicates that an application on 64-bit Windows should operate on the +32-bit registry view. KEY_WOW64_64KEY (0x0100) Indicates that an application on 64-bit Windows should operate on the +64-bit registry view.
So the beahvior observed is rigtly documented.

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.

Replies are listed 'Best First'.
Re^4: Reading subkeys from registry -- evil registry redirection?
by gepebril69 (Scribe) on Nov 17, 2015 at 13:27 UTC

    Thanks for the extended help sofar, in mean time I tried to work around this issue with 'reg query', but that gives different results running from CLI or batch/within Perl :(

    Q: what do you mean with The used flags have little different background?

    A: These were suggested with searching a different part of the registry with a different question

    Q:Also note that Here I didn't get undef values, but empty results is not so true: if you put null values as hashref's keys and then you look for the number of keys, ie zero.

    A: Well in this case I got a hasvalue returned, in the other case an undef value. Maybe that is similar, I thought that was different

    Will check this KEY_READ() solution, in the previous node. UPDATE! The KEY_READ() worked in the previous node. So that gives a good feeling.

    Anyway, no matter which access methode I use I get '0' results. Is there a way to switch on debuglevel to full so there is more data to work with

Re^4: Reading subkeys from registry -- evil registry redirection?
by gepebril69 (Scribe) on Nov 20, 2015 at 13:35 UTC

    Well the KEY_READ methode may be the right way to access the registry

    Unfortunately that doesn't explain why no keys are found in 32 and 64 Starwberry Perl versions on different Windows OS versions... ran in local user and admin mode (dos box)

    There must be some other access rule that prevents access to these subkeys as they are filled and accesible via othet tools..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found