TieRegistry Overlapped Error

Discussion in 'Perl Misc' started by Cosmic Cruizer, Mar 8, 2008.

  1. 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?
    Cosmic Cruizer, Mar 8, 2008
    #1
    1. Advertising

  2. 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 <> wrote in
    news:Xns9A5B588DAC39ccruizermydejacom@207.115.17.102:

    > 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?
    >
    >
    Cosmic Cruizer, Mar 9, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lewap
    Replies:
    1
    Views:
    1,280
    red floyd
    Jan 10, 2005
  2. yamadora1999
    Replies:
    0
    Views:
    317
    yamadora1999
    Jul 21, 2004
  3. BMW
    Replies:
    3
    Views:
    2,692
    BB206
    Oct 16, 2007
  4. BMW
    Replies:
    0
    Views:
    107
  5. AmyAdmin
    Replies:
    3
    Views:
    419
    Bob Barrows [MVP]
    Dec 3, 2004
Loading...

Share This Page