Title: Remote Registry access w/o UNC
if (! $KeyPerms->Set()) {  print "Error during set: $^E\n"; } returns the error: "The data area passed to the system call is too small".
 
my $Path = "Reg:HKEY_LOCAL_MACHINE\\Software\\TestKey1\\TestKey2";
my $KeyPerms = new Win32::Perms( $Path ) || warn "Could not create Perms object\n";
$KeyPerms->Allow('dss_test\TestUser2', 983103);
$KeyPerms->Dump;
if (! $KeyPerms->Set()) { print "Error during set: $^E\n";}
I have to use the value 983103 in order to get the HEX value of the MASK as it is displayed by:
 
$Dir->Dump (\@List); 
$i=0;
foreach $item (@List)
{
 print "$i\n";
 Win32::Perms::DecodeMask( $item, \@Mask, \@FriendlyMask);
 Win32::Perms::DecodeType( $item, \@Types );
 Win32::Perms::DecodeFlag( $item, \@Flags );
 print "\nMask:@FriendlyMask\nType:@Types\nFlags:@Flags\n\n";
 foreach $key (sort keys %{$item})
 {
  print "$key: ${$item}{$key}\n";
 }
 print "\n";
 $i++;
}
 
What am I missing or doing wrong???
-----Original Message-----
From: Bullock, Howard A.
Sent: Monday, March 12, 2001 11:36 AM
To: '[EMAIL PROTECTED]'
Subject: Win32::Perms and Registry

I have found that one error :
my $Path = "Reg:HKEY_LOCAL_MACHINE\Software\TestKey1\TestKey2";
 
Should be: my $Path = "Reg:HKEY_LOCAL_MACHINE\\Software\\TestKey1\\TestKey2";
But my basic questions and problem still persist.
 
Thanks.
 
 

Reply via email to