Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Scanning of 64 Bit registry

by wwe (Friar)
on Jan 10, 2011 at 15:48 UTC ( [id://881490]=note: print w/replies, xml ) Need Help??


in reply to Scanning of 64 Bit registry

I've used this module on Server 2008 64 bit successfully (32-bit Strawberry Perl 5.8 and 5.10 and same as pp-packed executable). There is nothing to take care about. The only problem is if you are using 32-bit application and try to access keys below
HKLM\Software
this access get redirected to
HKLM\Software\Wow6432Node
Maybe you want to check http://support.microsoft.com/kb/896459 and http://support.microsoft.com/kb/305097 for further information.

First try to check which version of perl you are running then check if the keys are available in the proper registry subkey.

Update: There are some hints on the MSDN how to access the other "registry view" using VB amd WMI. It should be not such hard to rewrite it in perl. Look at this article: http://msdn.microsoft.com/en-us/library/aa393067(VS.85).aspx

Replies are listed 'Best First'.
Re^2: Scanning of 64 Bit registry
by Anonymous Monk on Jan 11, 2011 at 12:33 UTC

    Hi,

    Thanks for your Support...

    here i will give you detailed description.I am able to access keys when i am using

    my @Keys_Lmachine = keys %{$RegHash{LMachine}{SOFTWARE}};

    but if i change my query to

    my @Keys_Lmachine = keys %{$RegHash{LMachine}{SYSTEM}}; it is returning undef

    may be it is because SOFTWARE is a shared subkey but not sure....

    Please comment..

    Regards

    Vikas Sharma

      Hi Vikas,

      this is not true. HKLM/System is shared/same but HKLM/Software/<some subkeys> is redirected or "reflected" how MS says. Please read and understand all provided links to MS knowledge base.

      At the moment I have no 64-bit system to check but I'm pretty sure the problem is somewhere else. I use OO-style access to the Win32::TieRegistry object like this
      my $registry_obj = $Registry->Connect( $hostname, $registry_key, { Acc +ess=>'KEY_READ' } ) or do { $log->error("access to [$registry_key] on host [$hostname] f +ailed"); return; }; $registry_obj->SetOptions( SplitMultis => 0 ); $registry_obj->SetOptions( FixSzNulls => 0 ); $registry_obj->SetOptions( ArrayValues => 0 ); $registry_obj->SetOptions( DWordsToHex => 1 ); } ... foreach my $registry_subkey ( $registry_obj->SubKeyNames() ) { something; }
      but I don't think it makes any difference. regards willi

        Hi all,

        That problem is solved without any modification actually it was permission issue i gave all previliages to that particular key and that issue was resolved

        Thanks all for Your responses

        Regards

        Vikas Sharma

        <Together we can we will !

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-04-23 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found