This
also works:
use Win32::TieRegistry (Delimiter =>
'/');
my $key;
my $host = 'ajax';
my $key = $Registry->{"//$host/HKEY_LOCAL_MACHINE/SOFTWARE/FOO/BAR/"};
$key->{'Eric'} = {}; #Makes an empty key
-----Original Message-----
From: Eric Hennessey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 11:59 AM
To: Timothy Johnson; [EMAIL PROTECTED]
Subject: RE: Registry woes
my $key;
my $host = 'ajax';
my $key = $Registry->{"//$host/HKEY_LOCAL_MACHINE/SOFTWARE/FOO/BAR/"};
$key->{'Eric'} = {}; #Makes an empty key
-----Original Message-----
From: Eric Hennessey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 11:59 AM
To: Timothy Johnson; [EMAIL PROTECTED]
Subject: RE: Registry woes
It appears the two are interchangeable. I've tried it both ways with the same result. *shrug*-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 2:42 PM
To: Eric Hennessey; [EMAIL PROTECTED]
Subject: RE: Registry woesWhat if you change LMachine to HKEY_LOCAL_MACHINE?-----Original Message-----
From: Eric Hennessey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 11:39 AM
To: [EMAIL PROTECTED]
Subject: Registry woesTo all those who replied to my previous post, thanks...you got me pointed in the right direction. Here's the problem I'm having now.The following code works great on the local machine if I remove the //$host/ from the path name in the Open methods, but fails on the first Open attempt when I try to run it against a remote machine. Any ideas?use Win32::TieRegistry (Delimiter => "/");my $key;
my $host = "ajax";if ($key = $Registry->Open("//$host/LMachine/SOFTWARE/FOO/BAR/")) {$key->CreateKey("Eric//") or
print "$^E\n";$key = $Registry->Open("//$host/LMachine/SOFTWARE/FOO/BAR/Eric/");$key->SetValue("MACAddress", "BIGMAC") or
print "$^E\n";} else {
print "Error: $^E\n";
}