Click here to get back home

TieRegistry Overlapped Error

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
TieRegistry Overlapped Error Cosmic Cruizer 03-08-2008
Posted by Cosmic Cruizer on March 8, 2008, 11:42 am
Please log in for more thread options
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-> || 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?


Posted by Cosmic Cruizer on March 9, 2008, 2:44 pm
Please log in for more thread options
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";



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


Similar ThreadsPosted
Win32::TieRegistry March 3, 2006, 7:53 am
TieRegistry with IPConfig April 1, 2008, 10:17 pm
Getting permissions using Win32::TieRegistry March 9, 2008, 3:20 pm
Win32::TieRegistry Logon User Name March 9, 2005, 12:56 am
Retrieving a registry data type using TieRegistry April 19, 2006, 5:59 am
Win32::TieRegistry -- replace string in the whole HKLM November 21, 2006, 4:57 am
use Win32::TieRegistry if ($^O =~ /win32/i) June 1, 2006, 12:58 pm
Error with script - internal error or misconfiguration January 27, 2005, 5:09 am
perlcc error - 'Can't unlink error file...' April 7, 2006, 10:13 am
Problem directing BCP Error to Error file January 16, 2008, 6:20 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap