I'm trying to query the registry of 2 remote machines: one is XPSP2 and the other is Vista. The following code works okay on the XPSP2 box, after tweaking some of the security settings, but I'm not getting it to work with the Vista box.
#! c:\perl use strict; use warnings; my $Registry; use Win32::TieRegistry 0.24 ( TiedRef => \$Registry, Delimiter=>"/", ArrayValues => 1, SplitMult +is => 1, AllowLoad => 1, qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ KEY_READ +KEY_WRITE KEY_ALL_ACCESS ), ); # ... $pc = remote machine name ... my $regKeyName = 'HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/Curren +tVersion/Uninstall/'; print STDERR "Checking the registry on $pc.\n"; my $remKey= $Registry->Connect( $pc, $regKeyName, { Access=>Win32::TieRegistry::KEY_READ() } ) or Carp::croak("!! Couldn't connect to $pc or can't open reg key ($r +egKeyName).\n". "!! - Is File and Printer Sharing enabled?\n$^E\n");
I get the following message:
The system could not find the environment option that was entered

It doesn't seem to currently be a problem with Windows Firewall, as I turned it off and got the same message. At least the firewall is not the only problem. I've also added read permissions to HKEY_LOCAL_MACHINE\SOFTWARE\ on the Vista machine for Guest and Everyone, just in case this was the issue. I'm running out of ideas of how to get this to work.

Does anyone have suggestions? Ideally I'd only open up the permissions in Vista just enough to allow this to work.

I'm using ActivePerl 5.8.8 Build 819 and Win32::TieRegistry 0.24

Thanks much,
Jonathan


In reply to Win32::TieRegistry and Vista by Shade

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.