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