Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > TieRegistry Overlapped Error

Reply
Thread Tools

TieRegistry Overlapped Error

 
 
Cosmic Cruizer
Guest
Posts: n/a
 
      03-08-2008
I'm trying to read the reg values on a remote server using
Win32::TieRegistry. I can remotely connect from my computer using regedit.
When I run the following, I get an error.

use diagnostics;
use Win32::TieRegistry(Delimiter=>"/");

use strict;

my ($reg_test, $reg_val);
my $server = 'some_server_name';
my $key_name =
'HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/ServiceCurrent';

$reg_test = $Registry->{"//$server/$key_name"} || die "Could not access
remote machine: $^E\n";

$reg_val = $reg_test->GetValue("Content Type");
print "REMOTE: $reg_test\t$reg_val\n";

exit 0;


This is the error I'm getting:

C:\test\reg_audit>reg_audit.pl
Uncaught exception from user code:
Could not access remote machine: Overlapped I/O operation is in
progress

at C:\test\reg_audit\reg_audit.pl line 10


Any suggestions?

 
Reply With Quote
 
 
 
 
Cosmic Cruizer
Guest
Posts: n/a
 
      03-09-2008
Took quite a bit of hacking, but I finally got it figured out:

$reg_test = $Registry->Connect( "$server", "$key_name",{ Access=>$KEY_READ
} ) || die "Could not access remote machine: $^E\n";


Cosmic Cruizer <(E-Mail Removed)> wrote in
news:Xns9A5B588DAC39ccruizermydejacom@207.115.17.1 02:

> I'm trying to read the reg values on a remote server using
> Win32::TieRegistry. I can remotely connect from my computer using
> regedit. When I run the following, I get an error.
>
> use diagnostics;
> use Win32::TieRegistry(Delimiter=>"/");
>
> use strict;
>
> my ($reg_test, $reg_val);
> my $server = 'some_server_name';
> my $key_name =
> 'HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Control/ServiceCurrent';
>
> $reg_test = $Registry->{"//$server/$key_name"} || die "Could not
> access remote machine: $^E\n";
>
> $reg_val = $reg_test->GetValue("Content Type");
> print "REMOTE: $reg_test\t$reg_val\n";
>
> exit 0;
>
>
> This is the error I'm getting:
>
> C:\test\reg_audit>reg_audit.pl
> Uncaught exception from user code:
> Could not access remote machine: Overlapped I/O operation is
> in
> progress
>
> at C:\test\reg_audit\reg_audit.pl line 10
>
>
> Any suggestions?
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re : Calendar Control popup was overlapped by others BMW ASP .Net 3 10-16-2007 06:46 PM
Re : Calendar Control popup was overlapped by others BMW ASP .Net Web Controls 0 10-16-2007 08:19 AM
Overlapped problem with CreateNamedPipe in NT Service Lewap C++ 1 01-10-2005 04:33 PM
DCom got error Overlapped I/O operation is in progress..... AmyAdmin ASP General 3 12-03-2004 02:11 AM
GetQueuedCompletionStatus return new OVERLAPPED yamadora1999 Python 0 07-21-2004 01:21 AM



Advertisments