Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Win32::TieRegistry surprises

by syphilis (Archbishop)
on Sep 24, 2010 at 12:57 UTC ( [id://861804]=perlquestion: print w/replies, xml ) Need Help??

syphilis has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
There are many things I don't understand about my Vista64 box - and this is one of them.
I have both x86 and x64 builds of ActivePerl 5.12.2 (build 1202), and I have this minimal script:
use warnings; use Win32::TieRegistry; my %Registry; use Win32::TieRegistry ( TiedHash => \%Registry ); print "$_\n" for keys %{$Registry->{LMachine}{SOFTWARE}};
I don't understand why that script produces one list of keys when I run it using the x86 build, and a different list of keys when I run it using the x64 build. Some keys appear in both lists, other keys in just one list or the other. Why is that ?

Both perl builds have the same versions of Win32API::Registry (0.30) and Win32::TieRegistry (0.26), and I'm running (as Administrator) both perls in the System32/cmd.exe shell.

Cheers,
Rob

Replies are listed 'Best First'.
Re: Win32::TieRegistry surprises
by BrowserUk (Patriarch) on Sep 24, 2010 at 13:06 UTC

    I think it probably is due to "Registry Virtualization in Windows Vista".

    If particular, for a possible source of the differences seen by 32-bit and 64-bit processes, see the section entitled: "What is Not Virtualized?"


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      ... for a possible source of the differences seen by 32-bit and 64-bit processes, see the section entitled: "What is Not Virtualized?"

      Yes, that seems to fit the bill quite nicely - thanks. Hard to believe that "Microsoft intends to remove this form of virtualization from future versions of the Windows operating system".

      Btw, after looking at this bug report, I did find that opening HKEY_LOCAL_MACHINE for KEY_READ access only (with x64 perl), did allow me access to the key in which I was interested, without having to run as Administrator.

      Cheers,
      Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-23 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found