Win32::TieRegistry->Connect - How to specify credentials on remote machine?



I'm trying to read registry information from a remote Windows PC, which
I have working when the remote PC has a user account with the same
login information as that of the PC trying to do the read. However, if
the remote machine doesn't have such a user account, then I get a "The
system could not find the environment option that was entered" error
message.

Is there a way to specify the user information for the remote machine
in conjunction with TieRegistry? Or, is there some other work around?

I'm using v5.8.8 built for MSWin32-x86-multi-thread on an XP SP2
machine. I've verified that just changing the password on the remote
machine is enough to make this succeed or fail. Here are the relevant
lines from the code:

my $Registry;
use Win32::TieRegistry 0.24 (
TiedRef => \$Registry, Delimiter => "/", ArrayValues => 1,
SplitMultis => 1, AllowLoad => 1,
qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ KEY_READ
KEY_WRITE KEY_ALL_ACCESS ),
);

my $regKeyName =
"HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall";
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
($regKeyName):\n$^E\n");

Thanks,
Jonathan

.



Relevant Pages

  • Re: Limited Access
    ... For users that you want to logon to a computer via Remote Desktop you need ... Remote Desktop Users group. ... sharing to the computer not impeded by a firewall and the user account also ... On my desktop and wired laptop the hard drives are ...
    (microsoft.public.windowsxp.security_admin)
  • Re: RWW - Local Policy connect to desktop issue
    ... it seems as if it is infact something with that user account. ... permissions as well as the replace permissions. ... only difference I see is in the logon script. ... firewall properties and enabled the Remote Desktop service. ...
    (microsoft.public.windows.server.sbs)
  • Re: TS 2008 Admin Connections
    ... Here's what I found via more trial and error (your references were good, but didn't seem to address the user account significance of the logon attempt - see below). ... I can logon to TWO TOTAL sessions via Remote Desktop IF each session uses DIFFERENT USER ACCOUNTS! ... In 2003, there could be three TOTAL sessions (one local keyboard, two remote) and they could ALL USE THE SAME USER ACCOUNT! ... In 2008, if you attempt to use the same user account for the second logon, it will let you log in but will automatically logoff the original remote connection without any prompting on either side. ...
    (microsoft.public.windows.terminal_services)
  • Re: Limited Access
    ... First off I will make the assumption that by remote connect you mean access ... to a network share through My Network Places and not Remote Desktop. ... to add a user account to the permissions list. ... the needed access to that folder. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: RWW - Local Policy connect to desktop issue
    ... I'd test with a clean user account ... Remote Desktop Users ... The user can logon to RWW but cannot connect to their 'computer at ... > As your user is in the local Power Users group, ...
    (microsoft.public.windows.server.sbs)