TieRegistry Overlapped Error

C

Cosmic Cruizer

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?
 
C

Cosmic Cruizer

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";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top